pub enum StrLen {
Chars,
Octets,
}Expand description
Which length a call asked for.
The two are one kernel because they differ in a single line and agree about everything else that is hard: the encodings, the nulls, and the fact that neither can raise.
Variants§
Chars
CHAR_LENGTH, and CHARACTER_LENGTH under its long spelling. The count of characters, which over UTF-8 is the count of bytes that are not continuations of the one before them.
Octets
OCTET_LENGTH. The count of bytes, which a view carries in its header, so this one never reads a payload at all.
Implementations§
Trait Implementations§
impl Copy for StrLen
impl Eq for StrLen
impl StructuralPartialEq for StrLen
Auto Trait Implementations§
impl Forget for StrLen
impl Freeze for StrLen
impl Move for StrLen
impl RefUnwindSafe for StrLen
impl Send for StrLen
impl Sync for StrLen
impl Unpin for StrLen
impl UnsafeUnpin for StrLen
impl UnwindSafe for StrLen
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