Skip to main content

ChoreoResult

Type Alias ChoreoResult 

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

Result type for choreography operations.

Aliased Type§

pub enum ChoreoResult<T> {
    Ok(T),
    Err(ChoreographyError),
}

Variants§

§1.0.0

Ok(T)

Contains the success value

§1.0.0

Err(ChoreographyError)

Contains the error value

Trait Implementations§

Source§

impl<T> ContextExt<T> for ChoreoResult<T>

Source§

fn with_protocol_context( self, protocol: &'static str, role: &'static str, phase: &'static str, ) -> ChoreoResult<T>

Add protocol context to an error.
Source§

fn with_role_context( self, role: &'static str, index: Option<u32>, ) -> ChoreoResult<T>

Add role context to an error.
Source§

fn with_message_context( self, operation: &'static str, message_type: &'static str, direction: &'static str, other_role: &'static str, ) -> ChoreoResult<T>

Add message context to an error.
Source§

fn with_context(self, context: impl Into<String>) -> ChoreoResult<T>

Add generic context to an error.