Enum cbor_event::Special
source · [−]Expand description
CBOR special (as in Special Primary Type).
Variants
Bool(bool)
Null
Undefined
Unassigned(u8)
Free to use values within: [0..=13] and [24..=31]
Float(f64)
Float is not fully supported in this library and it is advised to avoid using it for now.
Break
mark the stop of a given indefinite-length item
Implementations
sourceimpl Special
impl Special
pub fn unwrap_bool(&self) -> Result<bool>
pub fn unwrap_null(&self) -> Result<()>
pub fn unwrap_undefined(&self) -> Result<()>
pub fn unwrap_unassigned(&self) -> Result<u8>
pub fn unwrap_float(&self) -> Result<f64>
pub fn unwrap_break(&self) -> Result<()>
Trait Implementations
sourceimpl PartialOrd<Special> for Special
impl PartialOrd<Special> for Special
sourcefn partial_cmp(&self, other: &Special) -> Option<Ordering>
fn partial_cmp(&self, other: &Special) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · sourcefn 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 more
impl Copy for Special
impl StructuralPartialEq for Special
Auto Trait Implementations
impl RefUnwindSafe for Special
impl Send for Special
impl Sync for Special
impl Unpin for Special
impl UnwindSafe for Special
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more