# Trait actix_web::actix::actix::io::WriteHandler[−]

    pub trait WriteHandler<E>: Actor + Actor where
        Self::Context: ActorContext, {
        fn error(&mut self, err: E, ctx: &mut Self::Context) -> Running { ... }
        fn finished(&mut self, ctx: &mut Self::Context) { ... }
    }

Write handler

`WriteHandler` is a helper for `AsyncWrite` types. Implementation of this trait is required for `Writer` and `FramedWrite` support.

## Provided Methods

### `fn error(&mut self, err: E, ctx: &mut Self::Context) -> Running`

Method is called when writer emits error.

If this method returns `ErrorAction::Continue` writer processing continues otherwise stream processing stops.

### `fn finished(&mut self, ctx: &mut Self::Context)`

Method is called when writer finishes.

By default this method stops actor's `Context`.

## Implementors

# Help

## Keyboard Shortcuts

`?`
  Show this help dialog
`S`
  Focus the search field
`↑`
  Move up in search results
`↓`
  Move down in search results
`↹`
  Switch tab
`⏎`
  Go to active search result
`+`
  Expand all sections
`-`
  Collapse all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize` or `* -> vec`)

Search multiple things at once by splitting your query with comma (e.g. `str,u8` or `String,struct:Vec,test`)