Type Alias FrameInitOrResult
pub type FrameInitOrResult<FRAME> = ItemOrResult<<FRAME as FrameTr>::FrameInit, <FRAME as FrameTr>::FrameResult>;
Expand description
Type alias for frame initialization or result.
Aliased Type§
pub enum FrameInitOrResult<FRAME> {
Item(<FRAME as FrameTr>::FrameInit),
Result(<FRAME as FrameTr>::FrameResult),
}
Variants§
Item(<FRAME as FrameTr>::FrameInit)
Contains an item that needs further processing.
Result(<FRAME as FrameTr>::FrameResult)
Contains a final result.
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>
impl<ITEM, RES> ItemOrResult<ITEM, RES>
§impl<ITEM, RES> ItemOrResult<ITEM, RES>
impl<ITEM, RES> ItemOrResult<ITEM, RES>
pub fn map_frame<OITEM>(
self,
f: impl FnOnce(ITEM) -> OITEM,
) -> ItemOrResult<OITEM, RES>
pub fn map_frame<OITEM>( self, f: impl FnOnce(ITEM) -> OITEM, ) -> ItemOrResult<OITEM, RES>
Maps the item variant using the provided function, leaving results unchanged.
pub fn map_result<ORES>(
self,
f: impl FnOnce(RES) -> ORES,
) -> ItemOrResult<ITEM, ORES>
pub fn map_result<ORES>( self, f: impl FnOnce(RES) -> ORES, ) -> ItemOrResult<ITEM, ORES>
Maps the result variant using the provided function, leaving items unchanged.
Trait Implementations
§impl<ITEM, RES> Clone for ItemOrResult<ITEM, RES>
impl<ITEM, RES> Clone for ItemOrResult<ITEM, RES>
§fn clone(&self) -> ItemOrResult<ITEM, RES>
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)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more