Struct imgui::ImStr

source ·
#[repr(transparent)]
pub struct ImStr(_);
Expand description

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

Implementations§

Wraps a raw UTF-8 encoded C string

Safety

It is up to the caller to guarantee the pointer is not null and it points to a null-terminated UTF-8 string valid for the duration of the arbitrary lifetime ’a.

Converts a slice of bytes to an imgui-rs string slice without checking for valid UTF-8 or null termination.

Safety

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

Converts a CStr reference to an imgui-rs string slice without checking for valid UTF-8.

Safety

It is up to the caller to guarantee the CStr reference contains valid UTF-8.

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§

Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Immutably borrows from an owned value. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Formats the value using the given formatter. Read more
Converts to this type from the input type.
Feeds this value into the given Hasher. Read more
This method returns an Ordering between self and other. Read more
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
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
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

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
Converts the given value to a String. Read more