pub struct Required<V, const TAG: u64>(pub V);
Expand description
A required CBOR tag
This data type indicates that the specified tag, and only that tag, is required during deserialization. If the tag is missing, deserialization will fail. The tag will always be emitted during serialization.
Tuple Fields§
§0: V
Trait Implementations§
source§impl<'de, V: Deserialize<'de>, const TAG: u64> Deserialize<'de> for Required<V, TAG>
impl<'de, V: Deserialize<'de>, const TAG: u64> Deserialize<'de> for Required<V, TAG>
source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
source§impl<V: Ord, const TAG: u64> Ord for Required<V, TAG>
impl<V: Ord, const TAG: u64> Ord for Required<V, TAG>
1.21.0 · 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<V: PartialEq, const TAG: u64> PartialEq<Required<V, TAG>> for Required<V, TAG>
impl<V: PartialEq, const TAG: u64> PartialEq<Required<V, TAG>> for Required<V, TAG>
source§impl<V: PartialOrd, const TAG: u64> PartialOrd<Required<V, TAG>> for Required<V, TAG>
impl<V: PartialOrd, const TAG: u64> PartialOrd<Required<V, TAG>> for Required<V, TAG>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<V: Copy, const TAG: u64> Copy for Required<V, TAG>
impl<V: Eq, const TAG: u64> Eq for Required<V, TAG>
impl<V, const TAG: u64> StructuralEq for Required<V, TAG>
impl<V, const TAG: u64> StructuralPartialEq for Required<V, TAG>
Auto Trait Implementations§
impl<V, const TAG: u64> RefUnwindSafe for Required<V, TAG>where V: RefUnwindSafe,
impl<V, const TAG: u64> Send for Required<V, TAG>where V: Send,
impl<V, const TAG: u64> Sync for Required<V, TAG>where V: Sync,
impl<V, const TAG: u64> Unpin for Required<V, TAG>where V: Unpin,
impl<V, const TAG: u64> UnwindSafe for Required<V, TAG>where V: 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