[][src]Struct smartstring::LazyCompact

pub struct 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.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.