[−][src]Struct cbor_tools::ByteString
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]);
Trait Implementations
impl Clone for ByteString
[src]
pub fn clone(&self) -> ByteString
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for ByteString
[src]
impl From<ByteString> for CborType
[src]
pub fn from(x: ByteString) -> CborType
[src]
impl<T> From<T> for ByteString where
T: Into<Vec<u8>>,
[src]
T: Into<Vec<u8>>,
impl PartialEq<ByteString> for ByteString
[src]
pub fn eq(&self, other: &ByteString) -> bool
[src]
pub fn ne(&self, other: &ByteString) -> bool
[src]
impl StructuralPartialEq for ByteString
[src]
Auto Trait Implementations
impl RefUnwindSafe for ByteString
[src]
impl Send for ByteString
[src]
impl Sync for ByteString
[src]
impl Unpin for ByteString
[src]
impl UnwindSafe for ByteString
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,