Struct cbor_tools::TextString [−][src]
pub struct TextString(pub String);
Expand description
A UTF-8 text string.
use cbor_tools::{CborType, TextString, Encode};
let name = "Foo!";
let val = TextString::from(name);
assert_eq!(CborType::from(val).encode(), vec![0x64, 0x46, 0x6f, 0x6f, 0x21]);
Tuple Fields
0: String
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 TextString
impl Send for TextString
impl Sync for TextString
impl Unpin for TextString
impl UnwindSafe for TextString
Blanket Implementations
Mutably borrows from an owned value. Read more