Struct imgui::ImString[][src]

pub struct ImString(_);
Expand description

A UTF-8 encoded, growable, implicitly nul-terminated string.

Implementations

Creates a new ImString from an existing string.

Creates a new empty ImString with a particular capacity

Converts a vector of bytes to a ImString without checking that the string contains valid UTF-8

Safety

It is up to the caller to guarantee the vector contains valid UTF-8 and no null terminator.

Converts a vector of bytes to a ImString without checking that the string contains valid UTF-8

Safety

It is up to the caller to guarantee the vector contains valid UTF-8 and a null terminator.

Truncates this ImString, removing all contents

Appends the given character to the end of this ImString

Appends a given string slice to the end of this ImString

Returns the capacity of this ImString in bytes

Returns the capacity of this ImString in bytes, including the implicit null byte

Ensures that the capacity of this ImString is at least additional bytes larger than the current length.

The capacity may be increased by more than additional bytes.

Ensures that the capacity of this ImString is at least additional bytes larger than the current length

Returns a raw pointer to the underlying buffer

Returns a raw mutable pointer to the underlying buffer.

If the underlying data is modified, refresh_len must be called afterwards.

Updates the underlying buffer length based on the current contents.

This function must be called if the underlying data is modified via a pointer obtained by as_mut_ptr.

Safety

It is up to the caller to guarantee the this ImString contains valid UTF-8 and a null terminator.

Methods from Deref<Target = ImStr>

Converts an imgui-rs string slice to a raw pointer

Converts an imgui-rs string slice to a normal string slice

Returns true if the imgui-rs string slice is empty

Trait Implementations

Performs the conversion.

Performs the conversion.

Immutably borrows from an owned value. Read more

Immutably borrows from an owned value. Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

The resulting type after dereferencing.

Dereferences the value.

Formats the value using the given formatter. Read more

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

The returned type after indexing.

Performs the indexing (container[index]) operation. Read more

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Writes a string slice into this writer, returning whether the write succeeded. Read more

Writes a char into this writer, returning whether the write succeeded. Read more

Glue for usage of the write! macro with implementors of this trait. 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

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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.