[][src]Trait smartstring::SmartStringMode

pub trait SmartStringMode {
    type BoxedString: BoxedString + From<String>;
    type InlineArray: AsRef<[u8]> + AsMut<[u8]> + Clone + Copy;

    pub const MAX_INLINE: usize;
    pub const DEALLOC: bool;
}

Marker trait for SmartString representations.

See LazyCompact and Compact.

Associated Types

type BoxedString: BoxedString + From<String>[src]

The boxed string type for this layout.

type InlineArray: AsRef<[u8]> + AsMut<[u8]> + Clone + Copy[src]

The inline string type for this layout.

Loading content...

Associated Constants

pub const MAX_INLINE: usize[src]

The maximum capacity of an inline string, in bytes.

pub const DEALLOC: bool[src]

A constant to decide whether to turn a wrapped string back into an inlined string whenever possible (true) or leave it as a wrapped string once wrapping has occurred (false).

Loading content...

Implementors

impl SmartStringMode for Compact[src]

impl SmartStringMode for LazyCompact[src]

Loading content...