[][src]Struct imgui::ImString

pub struct ImString(_);

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

Methods

impl ImString[src]

pub fn new<T: Into<String>>(value: T) -> ImString[src]

Creates a new ImString from an existing string.

pub fn with_capacity(capacity: usize) -> ImString[src]

Creates a new empty ImString with a particular capacity

pub unsafe fn from_utf8_unchecked(v: Vec<u8>) -> ImString[src]

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

pub unsafe fn from_utf8_with_nul_unchecked(v: Vec<u8>) -> ImString[src]

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

pub fn clear(&mut self)[src]

Truncates this ImString, removing all contents

pub fn push(&mut self, ch: char)[src]

Appends the given character to the end of this ImString

pub fn push_str(&mut self, string: &str)[src]

Appends a given string slice to the end of this ImString

pub fn capacity(&self) -> usize[src]

Returns the capacity of this ImString in bytes

pub fn capacity_with_nul(&self) -> usize[src]

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

pub fn reserve(&mut self, additional: usize)[src]

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.

pub fn reserve_exact(&mut self, additional: usize)[src]

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

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

pub fn as_mut_ptr(&mut self) -> *mut c_char[src]

Methods from Deref<Target = ImStr>

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 AsRef<ImStr> for ImString[src]

impl AsRef<str> for ImString[src]

impl Eq for ImString[src]

impl<'a> Default for ImString[src]

impl Clone for ImString[src]

impl PartialOrd<ImString> for ImString[src]

impl Ord for ImString[src]

impl PartialEq<ImString> for ImString[src]

impl From<String> for ImString[src]

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

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

impl<'a, T: ?Sized + AsRef<ImStr>> From<&'a T> for ImString[src]

impl Hash for ImString[src]

impl Deref for ImString[src]

type Target = ImStr

The resulting type after dereferencing.

impl Index<RangeFull> for ImString[src]

type Output = ImStr

The returned type after indexing.

impl Display for ImString[src]

impl Debug for ImString[src]

impl Borrow<ImStr> for ImString[src]

impl Borrow<str> for ImString[src]

Auto Trait Implementations

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, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

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]