pub struct Array(pub Vec<CborType>);Expand description
An array of values.
In CBOR, arrays may have members of different types.
Use Array::from() to construct an array.
let nums = vec![1, 2, 3];
let array = Array::from(nums);
assert_eq!(CborType::from(array).encode(), vec![0x83, 1, 2, 3]);Tuple Fields§
§0: Vec<CborType>Trait Implementations§
impl StructuralPartialEq for Array
Auto Trait Implementations§
impl Freeze for Array
impl RefUnwindSafe for Array
impl Send for Array
impl Sync for Array
impl Unpin for Array
impl UnwindSafe for Array
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more