[−][src]Struct cddl_cat::ivt::Array
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
Auto Trait Implementations
impl RefUnwindSafe for Array
impl Send for Array
impl Sync for Array
impl Unpin for Array
impl UnwindSafe for Array
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,