pub enum RegisteredLabelWithPrivate<T: EnumI64 + WithPrivateRange> {
PrivateUse(i64),
Assigned(T),
Text(String),
}
Expand description
A COSE label which can be either a signed integer value or a string, and where the allowed integer values are governed by IANA but include a private use range.
Variants§
Trait Implementations§
source§impl<T: EnumI64 + WithPrivateRange> AsCborValue for RegisteredLabelWithPrivate<T>
impl<T: EnumI64 + WithPrivateRange> AsCborValue for RegisteredLabelWithPrivate<T>
source§impl<T: EnumI64 + WithPrivateRange> CborSerializable for RegisteredLabelWithPrivate<T>
impl<T: EnumI64 + WithPrivateRange> CborSerializable for RegisteredLabelWithPrivate<T>
source§fn from_slice(slice: &[u8]) -> Result<Self>
fn from_slice(slice: &[u8]) -> Result<Self>
Create an object instance from serialized CBOR data in a slice. This method will fail (with
CoseError::ExtraneousData
) if there is additional CBOR data after the object.source§impl<T: Clone + EnumI64 + WithPrivateRange> Clone for RegisteredLabelWithPrivate<T>
impl<T: Clone + EnumI64 + WithPrivateRange> Clone for RegisteredLabelWithPrivate<T>
source§fn clone(&self) -> RegisteredLabelWithPrivate<T>
fn clone(&self) -> RegisteredLabelWithPrivate<T>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<T: Debug + EnumI64 + WithPrivateRange> Debug for RegisteredLabelWithPrivate<T>
impl<T: Debug + EnumI64 + WithPrivateRange> Debug for RegisteredLabelWithPrivate<T>
source§impl<T: EnumI64 + WithPrivateRange> Ord for RegisteredLabelWithPrivate<T>
impl<T: EnumI64 + WithPrivateRange> Ord for RegisteredLabelWithPrivate<T>
Manual implementation of Ord
to ensure that CBOR canonical ordering is respected.
source§impl<T: PartialEq + EnumI64 + WithPrivateRange> PartialEq for RegisteredLabelWithPrivate<T>
impl<T: PartialEq + EnumI64 + WithPrivateRange> PartialEq for RegisteredLabelWithPrivate<T>
source§fn eq(&self, other: &RegisteredLabelWithPrivate<T>) -> bool
fn eq(&self, other: &RegisteredLabelWithPrivate<T>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<T: EnumI64 + WithPrivateRange> PartialOrd for RegisteredLabelWithPrivate<T>
impl<T: EnumI64 + WithPrivateRange> PartialOrd for RegisteredLabelWithPrivate<T>
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<T: Eq + EnumI64 + WithPrivateRange> Eq for RegisteredLabelWithPrivate<T>
impl<T: EnumI64 + WithPrivateRange> StructuralPartialEq for RegisteredLabelWithPrivate<T>
Auto Trait Implementations§
impl<T> Freeze for RegisteredLabelWithPrivate<T>
impl<T> RefUnwindSafe for RegisteredLabelWithPrivate<T>
impl<T> Send for RegisteredLabelWithPrivate<T>
impl<T> Sync for RegisteredLabelWithPrivate<T>
impl<T> Unpin for RegisteredLabelWithPrivate<T>
impl<T> UnwindSafe for RegisteredLabelWithPrivate<T>
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