Enum tinychain::state::StateView [−][src]
pub enum StateView<'en> {
Chain(ChainView<'en>),
Closure((HashMap<Id, StateView<'en>>, OpDef)),
Collection(CollectionView<'en>),
Map(HashMap<Id, StateView<'en>>),
Object(Box<ObjectView<'en>>),
Scalar(Scalar),
Stream(SeqStream<TCResult<StateView<'en>>, TCBoxTryStream<'en, StateView<'en>>>),
Tuple(Vec<StateView<'en>>),
}
Variants
Chain(ChainView<'en>)
Tuple Fields of Chain
0: ChainView<'en>
Collection(CollectionView<'en>)
Tuple Fields of Collection
0: CollectionView<'en>
Object(Box<ObjectView<'en>>)
Tuple Fields of Object
0: Box<ObjectView<'en>>
Scalar(Scalar)
Tuple Fields of Scalar
0: Scalar
Stream(SeqStream<TCResult<StateView<'en>>, TCBoxTryStream<'en, StateView<'en>>>)
Tuple Fields of Stream
0: SeqStream<TCResult<StateView<'en>>, TCBoxTryStream<'en, StateView<'en>>>
Trait Implementations
Auto Trait Implementations
impl<'en> !RefUnwindSafe for StateView<'en>
impl<'en> !UnwindSafe for StateView<'en>
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Returns true
if self
can be cast into the target type T
.
Test if value
can be cast into Self
.
Returns Some(Self)
if the source value can be cast into Self
, otherwise None
.
fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
Returns Ok(Self)
if the source value can be cast into Self
, otherwise calls on_err
.
Test if self
can be cast into T
.
Returns Some(T)
if self
can be cast into T
, otherwise None
.
fn try_cast_into<Err, OnErr>(self, on_err: OnErr) -> Result<T, Err> where
OnErr: FnOnce(&Self) -> Err,
fn try_cast_into<Err, OnErr>(self, on_err: OnErr) -> Result<T, Err> where
OnErr: FnOnce(&Self) -> Err,
Returns Ok(T)
if self
can be cast into T
, otherwise calls on_err
.