[][src]Struct imgui::ImStr

pub struct ImStr(_);

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

Methods

impl ImStr[src]

pub unsafe fn from_ptr_unchecked<'a>(ptr: *const c_char) -> &'a ImStr[src]

Wraps a raw UTF-8 encoded C string

pub unsafe fn from_utf8_with_nul_unchecked(bytes: &[u8]) -> &ImStr[src]

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

pub unsafe fn from_cstr_unchecked(value: &CStr) -> &ImStr[src]

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

pub fn as_ptr(&self) -> *const c_char[src]

Converts an imgui-rs string slice to a raw pointer

pub fn to_str(&self) -> &str[src]

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

pub fn is_empty(&self) -> bool[src]

Returns true if the imgui-rs string slice is empty

Trait Implementations

impl PartialOrd<ImStr> for ImStr[src]

impl PartialEq<ImStr> for ImStr[src]

impl Ord for ImStr[src]

fn max(self, other: Self) -> Self1.21.0[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self1.21.0[src]

Compares and returns the minimum of two values. Read more

fn clamp(self, min: Self, max: Self) -> Self[src]

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

Restrict a value to a certain interval. Read more

impl AsRef<ImStr> for ImString[src]

impl AsRef<CStr> for ImStr[src]

impl AsRef<ImStr> for ImStr[src]

impl AsRef<str> for ImStr[src]

impl Eq for ImStr[src]

impl<'a> Default for &'a ImStr[src]

impl ToOwned for ImStr[src]

type Owned = ImString

The resulting type after obtaining ownership.

fn clone_into(&self, target: &mut Self::Owned)[src]

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

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<'a> From<&'a ImStr> for Cow<'a, ImStr>[src]

impl Hash for ImStr[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

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

impl Debug for ImStr[src]

impl Display for ImStr[src]

impl Borrow<ImStr> for ImString[src]

Auto Trait Implementations

impl Send for ImStr

impl Unpin for ImStr

impl Sync for ImStr

impl UnwindSafe for ImStr

impl RefUnwindSafe for ImStr

Blanket Implementations

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]