pub enum CborValue<'i> {
Integer(i128),
Bytes(CborBytes<'i>),
Text(CborText<'i>),
Array(CborArray<'i>),
Map(CborMap<'i>),
Tag(u64, Box<CborValue<'i>>),
Float(CborFloat),
Bool(bool),
Null,
Undefined,
Simple(u8),
}Expand description
Generic CBOR value.
Variants§
Integer(i128)
An integer in the RFC 8949 range -2^64 ..= 2^64 - 1.
Bytes(CborBytes<'i>)
Text(CborText<'i>)
Array(CborArray<'i>)
Map(CborMap<'i>)
Tag(u64, Box<CborValue<'i>>)
Float(CborFloat)
Bool(bool)
Null
Undefined
Simple(u8)
An unassigned/registered simple value other than 20 through 23.
Implementations§
Source§impl<'i> CborValue<'i>
impl<'i> CborValue<'i>
pub fn arrow_0(self) -> u8
pub fn arrow_1(self) -> Box<CborValue<'i>>
pub fn arrow_Integer_0(self) -> i128
pub fn arrow_Bytes_0(self) -> CborBytes<'i>
pub fn arrow_Text_0(self) -> CborText<'i>
pub fn arrow_Array_0(self) -> CborArray<'i>
pub fn arrow_Map_0(self) -> CborMap<'i>
pub fn arrow_Tag_0(self) -> u64
pub fn arrow_Tag_1(self) -> Box<CborValue<'i>>
pub fn arrow_Float_0(self) -> CborFloat
pub fn arrow_Bool_0(self) -> bool
pub fn arrow_Simple_0(self) -> u8
Trait Implementations§
Source§impl<'i> PartialEq for CborValue<'i>
impl<'i> PartialEq for CborValue<'i>
Source§impl<'i, const DET: bool, const LIMIT: usize> Prepare<CborValue<'i>> for CborFmt<DET, LIMIT>where
CborRecBody<DET>: SpecRecBody<Param = (), T = CborValueSpec, Body = CborBodyFmt<DET>> + PrepareRecBody<CborValue<'i>, EP = ()>,
impl<'i, const DET: bool, const LIMIT: usize> Prepare<CborValue<'i>> for CborFmt<DET, LIMIT>where
CborRecBody<DET>: SpecRecBody<Param = (), T = CborValueSpec, Body = CborBodyFmt<DET>> + PrepareRecBody<CborValue<'i>, EP = ()>,
Source§impl<'i> PrepareRecBody<CborValue<'i>> for CborRecBody<false>
impl<'i> PrepareRecBody<CborValue<'i>> for CborRecBody<false>
Source§exec fn prepare_body<Exec>(
&self,
_param: &(),
spec_rec: Ghost<ParamRecSpecs<(), CborValueSpec>>,
exec_rec: Exec,
value: &CborValue<'i>,
) -> Result<usize, PreSerializeError>
exec fn prepare_body<Exec>( &self, _param: &(), spec_rec: Ghost<ParamRecSpecs<(), CborValueSpec>>, exec_rec: Exec, value: &CborValue<'i>, ) -> Result<usize, PreSerializeError>
type EP = ()
Source§impl<'i> PrepareRecBody<CborValue<'i>> for CborRecBody<true>
impl<'i> PrepareRecBody<CborValue<'i>> for CborRecBody<true>
Source§exec fn prepare_body<Exec>(
&self,
_param: &(),
spec_rec: Ghost<ParamRecSpecs<(), CborValueSpec>>,
exec_rec: Exec,
value: &CborValue<'i>,
) -> Result<usize, PreSerializeError>
exec fn prepare_body<Exec>( &self, _param: &(), spec_rec: Ghost<ParamRecSpecs<(), CborValueSpec>>, exec_rec: Exec, value: &CborValue<'i>, ) -> Result<usize, PreSerializeError>
type EP = ()
Source§impl<'i, Output: OutputBuf, const DET: bool, const LIMIT: usize> Serializer<Output, CborValue<'i>> for CborFmt<DET, LIMIT>
impl<'i, Output: OutputBuf, const DET: bool, const LIMIT: usize> Serializer<Output, CborValue<'i>> for CborFmt<DET, LIMIT>
Source§exec fn serialize_into(&self, value: &CborValue<'i>, out: &mut Output)
exec fn serialize_into(&self, value: &CborValue<'i>, out: &mut Output)
Source§impl<'i, Output: OutputBuf, const DET: bool> SerializerRecBody<Output, CborValue<'i>> for CborRecBody<DET>
impl<'i, Output: OutputBuf, const DET: bool> SerializerRecBody<Output, CborValue<'i>> for CborRecBody<DET>
Source§exec fn serialize_body<Exec>(
&self,
_param: &(),
Ghost(spec_rec): Ghost<ParamRecSpecs<(), CborValueSpec>>,
exec_rec: Exec,
value: &CborValue<'i>,
out: &mut Output,
)
exec fn serialize_body<Exec>( &self, _param: &(), Ghost(spec_rec): Ghost<ParamRecSpecs<(), CborValueSpec>>, exec_rec: Exec, value: &CborValue<'i>, out: &mut Output, )
type EP = ()
impl<'i> Eq for CborValue<'i>
impl<'i> StructuralPartialEq for CborValue<'i>
Auto Trait Implementations§
impl<'i> Freeze for CborValue<'i>
impl<'i> RefUnwindSafe for CborValue<'i>
impl<'i> Send for CborValue<'i>
impl<'i> Sync for CborValue<'i>
impl<'i> Unpin for CborValue<'i>
impl<'i> UnsafeUnpin for CborValue<'i>
impl<'i> UnwindSafe for CborValue<'i>
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