[][src]Struct cddl_cat::ivt::Array

pub struct Array {
    pub members: Vec<Node>,
}

An array is a list of types in a specific order.

Arrays are expected to take the form of "records" or "vectors".

A "vector" array is expected to have an arbitrary-length list of a single type, e.g. zero-or-more integers:

[ * int ]

The type in a vector could be something complex, like a group, choice, or another array or map.

A "record" array is a sequence of different values, each with a specific type. It has similar semantics to a rust tuple, though it could also theoretically be used to serialize a struct.

CDDL syntax allows certain nonsensical or ambiguous arrays, for example:

thing = [ * mygroup ]
mygroup = ( a = tstr, b = int)

or

thing = [ * "a" = int, * "b" = int ]

CDDL arrays may be composed of key-value pairs, but the keys are solely for information/debugging; they are ignored for validation purposes.

Fields

members: Vec<Node>

Trait Implementations

impl Clone for Array[src]

impl Debug for Array[src]

impl PartialEq<Array> for Array[src]

impl StructuralPartialEq for Array[src]

Auto Trait Implementations

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.