pub struct Tag<'a> { /* private fields */ }Expand description
CBOR Tag with reference to the tagged element
Implementations
sourceimpl<'a> Tag<'a>
impl<'a> Tag<'a>
pub fn tag_repr(&self) -> TagValue
pub fn value(&self) -> u64
pub fn data(&self) -> &'a CborSlice
pub fn reader(&self) -> Reader<'a>
pub fn read_data<F, T>(&self, f: F) -> Result<T, ReaderError> where
F: FnOnce(&mut Reader<'a>) -> Result<T, ReaderError>,
pub fn decode_data<T: Decode>(&self) -> Result<T, DecodeError>
pub fn owned(&self) -> TagOwned
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for Tag<'a>
impl<'a> Send for Tag<'a>
impl<'a> Sync for Tag<'a>
impl<'a> Unpin for Tag<'a>
impl<'a> UnwindSafe for Tag<'a>
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