pub struct Short { /* private fields */ }Expand description
A string short enough that it was stored inside the word.
It exists because an Element borrows and there is nothing to borrow
from: the bytes were in the eight bytes that were read, and unpacking them
somewhere is unavoidable. Carrying them by value in the element is seven
bytes on the caller’s stack, which is cheaper than the alternative of making
every reader pass in a scratch buffer for the case where the value is short.
Implementations§
Trait Implementations§
impl Copy for Short
impl Eq for Short
impl StructuralPartialEq for Short
Auto Trait Implementations§
impl Freeze for Short
impl RefUnwindSafe for Short
impl Send for Short
impl Sync for Short
impl Unpin for Short
impl UnsafeUnpin for Short
impl UnwindSafe for Short
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