Skip to main content

SmartStringMode

Trait SmartStringMode 

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

    const DEALLOC: bool;
}
Expand description

Marker trait for SmartString representations.

See LazyCompact and Compact.

Required Associated Constants§

Source

const DEALLOC: bool

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).

Required Associated Types§

Source

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

The inline string type for this layout.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§