[−][src]Enum cbor_tools::CborType
A CBOR value.
This enum can represent any CBOR value; see the documentation of each variant for more details.
Many variants can be constructed directly using from().
For example,
let i = 42; let x = CborType::from(i);
produces the same value as
let i = 42; let x = CborType::Integer(Integer::from(i));
Variants
Bool(bool)Integer(Integer)ByteString(ByteString)TextString(TextString)Array(Array)Map(Map)Indefinite(Indefinite)Tagged(Tagged)Float(Float)Trait Implementations
impl Clone for CborType[src]
impl Debug for CborType[src]
impl Encode for CborType[src]
impl EncodeSymbolic for CborType[src]
pub fn encode_symbolic(&self) -> Vec<Element>[src]
impl From<&'_ [u8]> for CborType[src]
impl From<&'_ str> for CborType[src]
impl From<Array> for CborType[src]
impl From<ByteString> for CborType[src]
pub fn from(x: ByteString) -> CborType[src]
impl From<Map> for CborType[src]
impl<T> From<T> for CborType where
T: Into<Integer>, [src]
T: Into<Integer>,
impl From<TextString> for CborType[src]
pub fn from(x: TextString) -> CborType[src]
impl<K, V> From<Vec<(K, V), Global>> for CborType where
K: Into<CborType>,
V: Into<CborType>, [src]
K: Into<CborType>,
V: Into<CborType>,
impl<T> From<Vec<T, Global>> for CborType where
T: Into<CborType>, [src]
T: Into<CborType>,
impl From<f16> for CborType[src]
impl From<f32> for CborType[src]
impl From<f64> for CborType[src]
impl PartialEq<CborType> for CborType[src]
impl StructuralPartialEq for CborType[src]
Auto Trait Implementations
impl RefUnwindSafe for CborType[src]
impl Send for CborType[src]
impl Sync for CborType[src]
impl Unpin for CborType[src]
impl UnwindSafe for CborType[src]
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>,