Struct sewup::types::SizedString [−][src]
Expand description
SizedString is a type help you store string in with a predefined size
let ss = sewup::types::SizedString::new(10).from_str("hello").unwrap();
assert!(ss.len() == 5);
assert!(ss.capacity() == 10);
assert_eq!(ss.to_utf8_string().unwrap(), "hello");
Fields
capacity: usize
The size of bytes limited
len: usize
Implementations
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for SizedString
impl Send for SizedString
impl Sync for SizedString
impl Unpin for SizedString
impl UnwindSafe for SizedString
Blanket Implementations
Mutably borrows from an owned value. Read more