VortexExpect

Trait VortexExpect 

Source
pub trait VortexExpect {
    type Output;

    // Required method
    fn vortex_expect(self, msg: &str) -> Self::Output;
}
Expand description

A trait for expect-ing a VortexResult or an Option.

Required Associated Types§

Source

type Output

The type of the value being expected.

Required Methods§

Source

fn vortex_expect(self, msg: &str) -> Self::Output

Returns the value of the result if it is Ok, otherwise panics with the error. Should be called only in contexts where the error condition represents a bug (programmer error).

Implementations on Foreign Types§

Source§

impl<T> VortexExpect for Option<T>

Source§

type Output = T

Source§

fn vortex_expect(self, msg: &str) -> Self::Output

Source§

impl<T, E> VortexExpect for Result<T, E>
where E: Into<VortexError>,

Source§

type Output = T

Source§

fn vortex_expect(self, msg: &str) -> Self::Output

Implementors§