pub struct Accepted<V, const TAG: u64>(pub V);
Expand description
An optional CBOR tag
This data type indicates that the specified tag, and only that tag, is accepted, but not required, during deserialization. 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 Accepted<V, TAG>
impl<'de, V: Deserialize<'de>, const TAG: u64> Deserialize<'de> for Accepted<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 Accepted<V, TAG>
impl<V: Ord, const TAG: u64> Ord for Accepted<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 Accepted<V, TAG>
impl<V: PartialOrd, const TAG: u64> PartialOrd for Accepted<V, TAG>
impl<V: Copy, const TAG: u64> Copy for Accepted<V, TAG>
impl<V: Eq, const TAG: u64> Eq for Accepted<V, TAG>
impl<V, const TAG: u64> StructuralPartialEq for Accepted<V, TAG>
Auto Trait Implementations§
impl<V, const TAG: u64> Freeze for Accepted<V, TAG>where
V: Freeze,
impl<V, const TAG: u64> RefUnwindSafe for Accepted<V, TAG>where
V: RefUnwindSafe,
impl<V, const TAG: u64> Send for Accepted<V, TAG>where
V: Send,
impl<V, const TAG: u64> Sync for Accepted<V, TAG>where
V: Sync,
impl<V, const TAG: u64> Unpin for Accepted<V, TAG>where
V: Unpin,
impl<V, const TAG: u64> UnwindSafe for Accepted<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.