struct ByteStr<'a>(&'a [u8]);Expand description
Wrapper that serializes as a CBOR byte string (major type 2). Without this
wrapper, serializing &[u8] via generic Serialize produces a CBOR array
of u8.
Tuple Fields§
§0: &'a [u8]Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for ByteStr<'a>
impl<'a> RefUnwindSafe for ByteStr<'a>
impl<'a> Send for ByteStr<'a>
impl<'a> Sync for ByteStr<'a>
impl<'a> Unpin for ByteStr<'a>
impl<'a> UnsafeUnpin for ByteStr<'a>
impl<'a> UnwindSafe for ByteStr<'a>
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