[−][src]Struct smartstring::LazyCompact
A representation similar to Compact
but which doesn't re-inline strings.
This is a variant of Compact
which doesn't aggressively inline strings.
Where Compact
automatically turns a heap allocated string back into an
inlined string if it should become short enough, LazyCompact
keeps
it heap allocated once heap allocation has occurred. If your aim is to defer heap
allocation as much as possible, rather than to ensure cache locality, this is the
variant you want - it won't allocate until the inline capacity is exceeded, and it
also won't deallocate once allocation has occurred, which risks reallocation if the
string exceeds its inline capacity in the future.
Trait Implementations
impl Debug for LazyCompact
[src]
impl SmartStringMode for LazyCompact
[src]
type BoxedString = String
The boxed string type for this layout.
type InlineArray = [u8; 23]
The inline string type for this layout.
const MAX_INLINE: usize
[src]
const DEALLOC: bool
[src]
Auto Trait Implementations
impl RefUnwindSafe for LazyCompact
impl Send for LazyCompact
impl Sync for LazyCompact
impl Unpin for LazyCompact
impl UnwindSafe for LazyCompact
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,