pub struct CompactArray<T>(pub Option<Vec<T>>);Expand description
Represents a sequence of objects of a given type T.
Type T can be either a primitive type (e.g. STRING) or a structure. First, the length N + 1 is given as an
UNSIGNED_VARINT. Then N instances of type T follow. A null array is represented with a length of 0. In protocol
documentation an array of T instances is referred to as [T].
Tuple Fields§
§0: Option<Vec<T>>Trait Implementations§
Source§impl<T: Debug> Debug for CompactArray<T>
impl<T: Debug> Debug for CompactArray<T>
Source§impl<T: Hash> Hash for CompactArray<T>
impl<T: Hash> Hash for CompactArray<T>
Source§impl<T: Ord> Ord for CompactArray<T>
impl<T: Ord> Ord for CompactArray<T>
Source§fn cmp(&self, other: &CompactArray<T>) -> Ordering
fn cmp(&self, other: &CompactArray<T>) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<T: PartialEq> PartialEq for CompactArray<T>
impl<T: PartialEq> PartialEq for CompactArray<T>
Source§fn eq(&self, other: &CompactArray<T>) -> bool
fn eq(&self, other: &CompactArray<T>) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl<T: PartialOrd> PartialOrd for CompactArray<T>
impl<T: PartialOrd> PartialOrd for CompactArray<T>
Source§impl<R, T> ReadType<R> for CompactArray<T>
impl<R, T> ReadType<R> for CompactArray<T>
Source§impl<W, T> WriteType<W> for CompactArray<T>
impl<W, T> WriteType<W> for CompactArray<T>
impl<T: Eq> Eq for CompactArray<T>
impl<T> StructuralPartialEq for CompactArray<T>
Auto Trait Implementations§
impl<T> Freeze for CompactArray<T>
impl<T> RefUnwindSafe for CompactArray<T>where
T: RefUnwindSafe,
impl<T> Send for CompactArray<T>where
T: Send,
impl<T> Sync for CompactArray<T>where
T: Sync,
impl<T> Unpin for CompactArray<T>where
T: Unpin,
impl<T> UnsafeUnpin for CompactArray<T>
impl<T> UnwindSafe for CompactArray<T>where
T: UnwindSafe,
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