Result

Type Alias Result 

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

A type alias for Result<T, Error>.

This alias is provided for convenience and consistency across the codebase. Most functions in WsForge return this type.

§Examples

use wsforge::prelude::*;

async fn my_handler(msg: Message) -> Result<String> {
    Ok("Success".to_string())
}

Aliased Type§

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

Variants§

§1.0.0

Ok(T)

Contains the success value

§1.0.0

Err(Error)

Contains the error value