Struct ignite::pstring::PString

source ·
pub struct PString {
    pub compression: bool,
    /* private fields */
}
Expand description

The PointString, a string variant comprised of a Vec which provides easy access and manipulation of individual bytes with support for in memory compression of strings.

Fields§

§compression: bool

Implementations§

Create a new, empty PString.

Get a specific char.

Create a new PString with a certain preallocated capacity to save reallocations.

Create a new PString with a Vec of bytes.

Set the bytes of an existing PString.

Set a existing PString to a str.

Set a existing PString to a str.

Create a PString from a str pointer.

Create a PString from a String.

Get the individual bytes that make up a PString.

Get the individual raw bytes that make up a PString.

Get a Vec of all chars in the pstring.

Enable compression.

Disable compression.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.