Skip to main content

Result

Type Alias Result 

Source
pub type Result<T> = Result<T, SerialError>;
Expand description

Convenience alias for Result<T, SerialError>.

Used throughout the codec so the trait surface stays terse. Crates that implement Serialize / Deserialize for their own types are encouraged to use it as well; nothing in the public API requires it.

§Examples

use pack_io::Result;

fn parse_header(_bytes: &[u8]) -> Result<u32> {
    Ok(0)
}

Aliased Type§

pub enum Result<T> {
    Ok(T),
    Err(SerialError),
}

Variants§

§1.0.0

Ok(T)

Contains the success value

§1.0.0

Err(SerialError)

Contains the error value