Enum tinychain::scalar::Scalar[][src]

pub enum Scalar {
    Map(Map<Self>),
    Op(OpDef),
    Ref(Box<TCRef>),
    Tuple(Tuple<Self>),
    Value(Value),
}

A scalar value, i.e. one which is always held in main memory and never split into blocks.

Variants

Map(Map<Self>)
Op(OpDef)
Ref(Box<TCRef>)
Tuple(Tuple<Self>)
Value(Value)

Implementations

impl Scalar[src]

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

Return true if self is an empty tuple, default link, or Value::None.

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

Return true if self is a reference type which needs to be resolved.

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

Cast this Scalar into the specified ScalarType, if possible.

Trait Implementations

impl Clone for Scalar[src]

impl Default for Scalar[src]

impl Display for Scalar[src]

impl Eq for Scalar[src]

impl From<Link> for Scalar[src]

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

impl From<Scalar> for State[src]

impl From<TCRef> for Scalar[src]

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

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

impl From<Value> for Scalar[src]

impl FromStream for Scalar[src]

type Context = ()

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 Scalar[src]

type Class = ScalarType

The Class type of this instance

impl<'en> IntoStream<'en> for Scalar[src]

impl PartialEq<Scalar> for Scalar[src]

impl Refer for Scalar[src]

impl StructuralEq for Scalar[src]

impl StructuralPartialEq for Scalar[src]

impl<'en> ToStream<'en> for Scalar[src]

impl TryCastFrom<Scalar> for After[src]

impl TryCastFrom<Scalar> for Case[src]

impl TryCastFrom<Scalar> for Value[src]

impl TryCastFrom<Scalar> for OpRef[src]

impl TryCastFrom<Scalar> for IfRef[src]

impl TryCastFrom<Scalar> for Subject[src]

impl TryCastFrom<Scalar> for OpDef[src]

impl TryCastFrom<Scalar> for TCRef[src]

impl TryCastFrom<Scalar> for IdRef[src]

impl TryCastFrom<Scalar> for Link[src]

impl TryCastFrom<Scalar> for Number[src]

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

impl TryCastFrom<State> for Scalar[src]

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

type Error = TCError

The type returned in the event of a conversion error.

impl TryFrom<Scalar> for Value[src]

type Error = TCError

The type returned in the event of a conversion error.

Auto Trait Implementations

impl RefUnwindSafe for Scalar

impl Send for Scalar

impl Sync for Scalar

impl Unpin for Scalar

impl UnwindSafe for Scalar

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<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[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>,