Skip to main content

SExpect

Trait SExpect 

Source
pub trait SExpect: Sized {
    type Output;

    // Required method
    fn s_expect<'tcx, S: BaseState<'tcx>>(
        self,
        s: &S,
        message: &str,
    ) -> Self::Output;

    // Provided method
    fn s_unwrap<'tcx, S: BaseState<'tcx>>(self, s: &S) -> Self::Output { ... }
}

Required Associated Types§

Required Methods§

Source

fn s_expect<'tcx, S: BaseState<'tcx>>( self, s: &S, message: &str, ) -> Self::Output

Provided Methods§

Source

fn s_unwrap<'tcx, S: BaseState<'tcx>>(self, s: &S) -> Self::Output

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<T: Debug, E: Debug> SExpect for Result<T, E>

Source§

type Output = T

Source§

fn s_expect<'tcx, S: BaseState<'tcx>>( self, s: &S, message: &str, ) -> Self::Output

Source§

impl<T: Debug> SExpect for Option<T>

Source§

type Output = T

Source§

fn s_expect<'tcx, S: BaseState<'tcx>>( self, s: &S, message: &str, ) -> Self::Output

Implementors§