Type Alias FrameOrResult

pub type FrameOrResult<FRAME> = ItemOrResult<FRAME, <FRAME as Frame>::FrameResult>;

Aliased Type§

pub enum FrameOrResult<FRAME> {
    Item(FRAME),
    Result(<FRAME as Frame>::FrameResult),
}

Variants§

§

Item(FRAME)

§

Result(<FRAME as Frame>::FrameResult)

Layout§

Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.

Implementations

§

impl<ITEM, RES> ItemOrResult<ITEM, RES>

pub fn map_frame<OITEM>( self, f: impl FnOnce(ITEM) -> OITEM, ) -> ItemOrResult<OITEM, RES>

pub fn map_result<ORES>( self, f: impl FnOnce(RES) -> ORES, ) -> ItemOrResult<ITEM, ORES>

Trait Implementations

§

impl<ITEM, RES> Clone for ItemOrResult<ITEM, RES>
where ITEM: Clone, RES: Clone,

§

fn clone(&self) -> ItemOrResult<ITEM, RES>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl<ITEM, RES> Debug for ItemOrResult<ITEM, RES>
where ITEM: Debug, RES: Debug,

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more