Skip to main content

ExTry

Trait ExTry 

Source
pub trait ExTry: FromResidual<Self::Residual> {
    type ExternalTraitSpecificationFor: Try;
    type Output;
    type Residual: Residual<Self::Output>;

    // Required methods
    spec fn may_unwind(&self) -> bool;
    spec fn branch_model_is_valid() -> bool;
    spec fn branch_model(self) -> ControlFlow<Self::Residual, Self::Output>
       where Self: Sized;
    exec fn branch(self) -> ret : ControlFlow<Self::Residual, Self::Output>
       where Self: Sized;
    exec fn from_output(output: Self::Output) -> Self
       where Self: Sized;
}
Expand description

The result of ? need not have a canonical representation.

Required Associated Types§

Required Methods§

Source

spec fn may_unwind(&self) -> bool

Whether branch may unwind for this value.

Source

spec fn branch_model_is_valid() -> bool

The result of branch matches its functional spec

Source

spec fn branch_model(self) -> ControlFlow<Self::Residual, Self::Output>
where Self: Sized,

Source

exec fn branch(self) -> ret : ControlFlow<Self::Residual, Self::Output>
where Self: Sized,

ensures
Self::branch_model_is_valid() ==> ret == Self::branch_model(self),
Source

exec fn from_output(output: Self::Output) -> Self
where Self: Sized,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§