Struct Valid
pub(crate) struct Valid<T>(pub(crate) Option<T>);Expand description
A value preceded by a u8 flag that says whether it is set.
The value is on the wire either way. It is None if the flag is zero.
T must decode any bit pattern. Otherwise an unset value with an invalid
pattern fails the whole message.
Tuple Fields§
§0: Option<T>Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Valid<T>
impl<T> RefUnwindSafe for Valid<T>where
Option<T>: RefUnwindSafe,
impl<T> Send for Valid<T>
impl<T> Sync for Valid<T>
impl<T> Unpin for Valid<T>
impl<T> UnsafeUnpin for Valid<T>where
Option<T>: UnsafeUnpin,
impl<T> UnwindSafe for Valid<T>where
Option<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