Struct cbor_tools::ByteString [−][src]
Expand description
A byte string.
A “byte string” in CBOR is an arbitrary length array of bytes.
use cbor_tools::{CborType, ByteString, Encode};
let bytes = [1u8, 2, 3, 4];
let val = ByteString::from(&bytes[..]);
assert_eq!(CborType::from(val).encode(), vec![0x44, 1, 2, 3, 4]);
Tuple Fields
0: Vec<u8>
Trait Implementations
Performs the conversion.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for ByteString
impl Send for ByteString
impl Sync for ByteString
impl Unpin for ByteString
impl UnwindSafe for ByteString
Blanket Implementations
Mutably borrows from an owned value. Read more