pub struct StrLength {
pub bytes: usize,
pub chars: usize,
}
Expand description
Length of a string measured in bytes and chars.
Fields§
§bytes: usize
Number of bytes the string occupies.
chars: usize
Number of chars in the string.
Implementations§
Trait Implementations§
impl Copy for StrLength
impl StructuralPartialEq for StrLength
Auto Trait Implementations§
impl Freeze for StrLength
impl RefUnwindSafe for StrLength
impl Send for StrLength
impl Sync for StrLength
impl Unpin for StrLength
impl UnwindSafe for StrLength
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