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§
source§impl 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§
source§impl PartialOrd<Special> for Special
impl PartialOrd<Special> for Special
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 more