[][src]Trait smartstring::SmartStringMode

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

    const MAX_INLINE: usize;
    const PREFIXED: bool;
}

Marker trait for SmartString representations.

See Compact and Prefixed.

Associated Types

type BoxedString: BoxedString + From<String>

The boxed string type for this layout.

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

The inline string type for this layout.

Loading content...

Associated Constants

const MAX_INLINE: usize

The maximum capacity of an inline string, in bytes.

const PREFIXED: bool

A constant to decide whether to use Prefixed optimisations when comparing, in the absence of specialisation.

Loading content...

Implementors

impl SmartStringMode for Compact[src]

impl SmartStringMode for Prefixed[src]

type BoxedString = FragmentString

type InlineArray = [u8; 31]

Loading content...