[][src]Enum cddl_cat::value::Value

pub enum Value {
    Null,
    Bool(bool),
    Integer(i128),
    Float(FloatOrd<f64>),
    Bytes(Vec<u8>),
    Text(String),
    Array(Vec<Value>),
    Map(BTreeMap<Value, Value>),
}

Value represents all the types of data we can validate.

To validate a new type of data, write implementations of the From trait for that type. See the cbor module for an example.

Variants

Null
Bool(bool)
Integer(i128)
Float(FloatOrd<f64>)
Bytes(Vec<u8>)
Text(String)
Array(Vec<Value>)

Trait Implementations

impl Clone for Value[src]

impl Debug for Value[src]

impl Eq for Value[src]

impl<'_> From<&'_ Literal> for Value[src]

Create a Value from a Literal.

impl Ord for Value[src]

impl PartialEq<Value> for Value[src]

impl PartialOrd<Value> for Value[src]

impl StructuralEq for Value[src]

impl StructuralPartialEq for Value[src]

impl<'_> TryFrom<&'_ Value> for Value[src]

type Error = ValidateError

The type returned in the event of a conversion error.

impl<'_> TryFrom<&'_ Value> for Value[src]

type Error = ValidateError

The type returned in the event of a conversion error.

impl TryFrom<Value> for Value[src]

type Error = ValidateError

The type returned in the event of a conversion error.

impl TryFrom<Value> for Value[src]

type Error = ValidateError

The type returned in the event of a conversion error.

Auto Trait Implementations

impl RefUnwindSafe for Value

impl Send for Value

impl Sync for Value

impl Unpin for Value

impl UnwindSafe for Value

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<T> From<T> for T[src]

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

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

type Owned = T

The resulting type after obtaining ownership.

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.