Skip to main content

HookResult

Type Alias HookResult 

Source
pub type HookResult<T, E> = Result<T, Error<E>>;
Expand description

Result type for connection hooks.

This is intentionally named HookResult (not Result) to make it clear this is not std::result::Result. A HookResult can be:

  • Ok(io) - success, returns the IO stream
  • Err(Error::Io(..)) - an I/O error occurred
  • Err(Error::Hook(..)) - a hook-specific error occurred

Aliased Type§

pub enum HookResult<T, E> {
    Ok(T),
    Err(Error<E>),
}

Variants§

§1.0.0

Ok(T)

Contains the success value

§1.0.0

Err(Error<E>)

Contains the error value