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: PartialEq, const TAG: u64> PartialEq<Accepted<V, TAG>> for Accepted<V, TAG>
impl<V: PartialEq, const TAG: u64> PartialEq<Accepted<V, TAG>> for Accepted<V, TAG>
source§impl<V: PartialOrd, const TAG: u64> PartialOrd<Accepted<V, TAG>> for Accepted<V, TAG>
impl<V: PartialOrd, const TAG: u64> PartialOrd<Accepted<V, TAG>> for Accepted<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 Accepted<V, TAG>
impl<V: Eq, const TAG: u64> Eq for Accepted<V, TAG>
impl<V, const TAG: u64> StructuralEq for Accepted<V, TAG>
impl<V, const TAG: u64> StructuralPartialEq for Accepted<V, TAG>
Auto Trait Implementations§
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