[][src]Trait ensure::Ensure

pub trait Ensure: Sized {
    type MeetAction: MeetAction;
    type Met;
    fn try_met(self) -> TryMetResult<Self::Met, Self::MeetAction>;

    fn met(self) -> MetResult<Self::Met, <Self::MeetAction as MeetAction>::Met> { ... }
fn met_verify(self) -> Result<Self::Met, UnmetError>
    where
        Self: Clone
, { ... } }

Implement for types of objects that can be brought to target state

Associated Types

Loading content...

Required methods

fn try_met(self) -> TryMetResult<Self::Met, Self::MeetAction>

Check if already Met or provide MeetAction which can be performed by calling meet()

Loading content...

Provided methods

fn met(self) -> MetResult<Self::Met, <Self::MeetAction as MeetAction>::Met>

Meet the Ensure by calling try_met() and if not Met calling meet() on MeetAction

fn met_verify(self) -> Result<Self::Met, UnmetError> where
    Self: Clone

Ensure it is met() and then verify it is in fact Met with try_met()

Loading content...

Implementors

impl<MET, MA, IMF> Ensure for IMF where
    IMF: FnOnce() -> TryMetResult<MET, MA>,
    MA: MeetAction
[src]

type MeetAction = MA

type Met = MET

fn met(self) -> MetResult<Self::Met, <Self::MeetAction as MeetAction>::Met>[src]

fn met_verify(self) -> Result<Self::Met, UnmetError> where
    Self: Clone
[src]

Loading content...