pub struct Simple(/* private fields */);Expand description
A CBOR simple value number.
Values 24 through 31 are reserved by RFC 8949 §3.3 and cannot be encoded
in well-formed CBOR. Construct a Simple with Simple::new or
TryFrom<u8> so reserved values are rejected before serialization.
Implementations§
Trait Implementations§
impl Copy for Simple
Source§impl<'de> Deserialize<'de> for Simple
impl<'de> Deserialize<'de> for Simple
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Simple
Source§impl Ord for Simple
impl Ord for Simple
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Simple
impl PartialOrd for Simple
impl StructuralPartialEq for Simple
Source§impl TryFrom<Value> for Simple
Converts from Value::Simple; any other variant is an "invalid type" error.
impl TryFrom<Value> for Simple
Converts from Value::Simple; any other variant is an "invalid type" error.
The Value::into_* accessors are the
non-consuming-on-failure alternative: they hand the original
value back instead of an error message.
Auto Trait Implementations§
impl Freeze for Simple
impl RefUnwindSafe for Simple
impl Send for Simple
impl Sync for Simple
impl Unpin for Simple
impl UnsafeUnpin for Simple
impl UnwindSafe for Simple
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