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: PartialOrd, const TAG: u64> PartialOrd for Required<V, TAG>
impl<V: PartialOrd, const TAG: u64> PartialOrd for Required<V, TAG>
impl<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> StructuralPartialEq for Required<V, TAG>
Auto Trait Implementations§
impl<V, const TAG: u64> Freeze for Required<V, TAG>where
V: Freeze,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Layout§
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.