[−][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; 11]
The inline string type for this layout.
pub const MAX_INLINE: usize
[src]
pub const DEALLOC: bool
[src]
Auto Trait Implementations
impl RefUnwindSafe for LazyCompact
[src]
impl Send for LazyCompact
[src]
impl Sync for LazyCompact
[src]
impl Unpin for LazyCompact
[src]
impl UnwindSafe for LazyCompact
[src]
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,
pub 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.
pub 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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,