Enum tinychain::state::State[][src]

pub enum State {
    Chain(Chain),
    Map(Map<Self>),
    Object(Object),
    Scalar(Scalar),
    Tuple(Tuple<Self>),
}

An addressable state with a discrete value per-transaction.

Variants

Chain(Chain)
Map(Map<Self>)
Object(Object)
Scalar(Scalar)
Tuple(Tuple<Self>)

Implementations

impl State[src]

pub fn is_none(&self) -> bool[src]

Return true if this State is an empty Tuple or Map, default Link, or Value::None

pub fn is_some(&self) -> bool[src]

Return false if this State is an empty Tuple or Map, default Link, or Value::None

pub fn is_ref(&self) -> bool[src]

Return true if this State is a reference that needs to be resolved.

pub fn into_type(self, class: StateType) -> Option<Self>[src]

Cast this State into the given StateType, if possible.

Trait Implementations

impl Clone for State[src]

impl Default for State[src]

impl Display for State[src]

impl From<()> for State[src]

impl From<Box<TCRef, Global>> for State[src]

impl From<Chain> for State[src]

impl<T: Instance> From<InstanceExt<T>> for State where
    State: From<T>, 
[src]

impl From<Link> for State[src]

impl From<Map<Scalar>> for State[src]

impl From<Map<State>> for State[src]

impl From<OpRef> for State[src]

impl From<Scalar> for State[src]

impl From<TCRef> for State[src]

impl From<Tuple<Scalar>> for State[src]

impl From<Tuple<State>> for State[src]

impl From<Tuple<Value>> for State[src]

impl From<Value> for State[src]

impl FromStream for State[src]

type Context = Txn

The decoding context of this type, useful in situations where the stream to be decoded may be too large to hold in main memory. Read more

impl Instance for State[src]

type Class = StateType

The Class type of this instance

impl Refer for State[src]

impl<T: Clone + TryCastFrom<State>> TryCastFrom<State> for Map<T>[src]

impl TryCastFrom<State> for IdRef[src]

impl TryCastFrom<State> for Link[src]

impl TryCastFrom<State> for OpDef[src]

impl TryCastFrom<State> for OpRef[src]

impl TryCastFrom<State> for Scalar[src]

impl TryCastFrom<State> for Value[src]

impl TryFrom<State> for Map<State>[src]

type Error = TCError

The type returned in the event of a conversion error.

impl TryFrom<State> for Value[src]

type Error = TCError

The type returned in the event of a conversion error.

Auto Trait Implementations

impl RefUnwindSafe for State

impl Send for State

impl Sync for State

impl Unpin for State

impl UnwindSafe for State

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<F, T> CastFrom<F> for T where
    T: From<F>, 
[src]

impl<T, F> CastInto<F> for T where
    F: CastFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<F> Match for F[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<F, T> TryCastFrom<F> for T where
    T: CastFrom<F>, 
[src]

impl<F, T> TryCastInto<T> for F where
    T: TryCastFrom<F>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,