pub enum Nullable<T> {
Null,
Value(T),
}Expand description
A value that may be explicitly null on the wire (Matter quality X).
Distinct from Option: Option<T> models an optional element
(its tag is absent entirely), whereas Nullable<T> models a present
element whose TLV value is the null type. A field that is both optional
and nullable is Option<Nullable<T>>.
Variants§
Implementations§
Trait Implementations§
impl<T: Copy> Copy for Nullable<T>
impl<T: Eq> Eq for Nullable<T>
impl<T: PartialEq> StructuralPartialEq for Nullable<T>
Auto Trait Implementations§
impl<T> Freeze for Nullable<T>where
T: Freeze,
impl<T> RefUnwindSafe for Nullable<T>where
T: RefUnwindSafe,
impl<T> Send for Nullable<T>where
T: Send,
impl<T> Sync for Nullable<T>where
T: Sync,
impl<T> Unpin for Nullable<T>where
T: Unpin,
impl<T> UnsafeUnpin for Nullable<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Nullable<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