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§
Trait Implementations§
Source§impl<T> ContextExt<T> for ChoreoResult<T>
impl<T> ContextExt<T> for ChoreoResult<T>
Source§fn with_protocol_context(
self,
protocol: &'static str,
role: &'static str,
phase: &'static str,
) -> ChoreoResult<T>
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>
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>
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>
fn with_context(self, context: impl Into<String>) -> ChoreoResult<T>
Add generic context to an error.