[−][src]Enum moz_cbor::CborType
Variants
Integer(u64)
SignedInteger(i64)
String(String)
Implementations
impl CborType
[src]
pub fn serialize(&self) -> Vec<u8>
[src]
Serialize a Cbor object. NB: if the object to be serialized consists of too many nested Cbor objects (for example, Array(Array(Array(...(Array(0))))), it is possible that calling serialize will exhaust the stack. It is considered the caller's responsibility to prevent this.
Trait Implementations
impl Clone for CborType
[src]
impl Debug for CborType
[src]
impl Eq for CborType
[src]
impl Ord for CborType
[src]
pub fn cmp(&self, other: &Self) -> Ordering
[src]
Sorting for maps: RFC 7049 Section 3.9
The keys in every map must be sorted lowest value to highest.
-
If two keys have different lengths, the shorter one sorts earlier;
-
If two keys have the same length, the one with the lower value in (byte-wise) lexical order sorts earlier.
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<CborType> for CborType
[src]
impl PartialOrd<CborType> for CborType
[src]
pub fn partial_cmp(&self, other: &CborType) -> Option<Ordering>
[src]
pub fn lt(&self, other: &CborType) -> bool
[src]
pub fn le(&self, other: &CborType) -> bool
[src]
pub fn gt(&self, other: &CborType) -> bool
[src]
pub fn ge(&self, other: &CborType) -> bool
[src]
impl StructuralEq for CborType
[src]
impl StructuralPartialEq for CborType
[src]
Auto Trait Implementations
impl RefUnwindSafe for CborType
impl Send for CborType
impl Sync for CborType
impl Unpin for CborType
impl UnwindSafe for CborType
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,