Type Alias StringType

pub type StringType<'a> = Cow<'a, str>;
Expand description

A string type which changes depending on the platform.

When the alloc feature is enabled, this is Cow<'a, str> which can hold either borrowed or owned string data. When alloc is disabled, this is &'a str which only holds borrowed string data.

Aliased Type§

pub enum StringType<'a> {
    Borrowed(&'a str),
    Owned(String),
}

Variants§

§1.0.0

Borrowed(&'a str)

Borrowed data.

§1.0.0

Owned(String)

Owned data.