Trait easy_imgui::IntoCStr

source ·
pub trait IntoCStr: Sized {
    type Temp: Deref<Target = CStr>;

    // Required methods
    fn into(self) -> Self::Temp;
    fn into_cstring(self) -> CString;
    fn len(&self) -> usize;

    // Provided methods
    fn is_empty(&self) -> bool { ... }
    unsafe fn push_to_non_null_vec(self, bs: &mut Vec<u8>) { ... }
}
Expand description

Represents any type that can be converted into something that can be deref’ed to a &CStr.

Required Associated Types§

source

type Temp: Deref<Target = CStr>

Required Methods§

source

fn into(self) -> Self::Temp

source

fn into_cstring(self) -> CString

source

fn len(&self) -> usize

Provided Methods§

source

fn is_empty(&self) -> bool

source

unsafe fn push_to_non_null_vec(self, bs: &mut Vec<u8>)

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl IntoCStr for &str

source§

type Temp = CString

source§

fn into(self) -> Self::Temp

source§

fn into_cstring(self) -> CString

source§

fn len(&self) -> usize

source§

unsafe fn push_to_non_null_vec(self, bs: &mut Vec<u8>)

source§

impl IntoCStr for &String

source§

type Temp = CString

source§

fn into(self) -> Self::Temp

source§

fn into_cstring(self) -> CString

source§

fn len(&self) -> usize

source§

unsafe fn push_to_non_null_vec(self, bs: &mut Vec<u8>)

source§

impl IntoCStr for &CStr

source§

type Temp = &CStr

source§

fn into(self) -> Self

source§

fn into_cstring(self) -> CString

source§

fn len(&self) -> usize

source§

impl IntoCStr for CString

source§

type Temp = CString

source§

fn into(self) -> Self

source§

fn into_cstring(self) -> CString

source§

fn len(&self) -> usize

source§

impl IntoCStr for String

source§

type Temp = CString

source§

fn into(self) -> Self::Temp

source§

fn into_cstring(self) -> CString

source§

fn len(&self) -> usize

source§

impl<'a> IntoCStr for &'a CString

source§

type Temp = &'a CStr

source§

fn into(self) -> &'a CStr

source§

fn into_cstring(self) -> CString

source§

fn len(&self) -> usize

source§

impl<'a, B> IntoCStr for Cow<'a, B>
where B: 'a + ToOwned + ?Sized, &'a B: IntoCStr, B::Owned: IntoCStr, <&'a B as IntoCStr>::Temp: Into<Cow<'a, CStr>>,

source§

type Temp = Cow<'a, CStr>

source§

fn into(self) -> Cow<'a, CStr>

source§

fn into_cstring(self) -> CString

source§

fn len(&self) -> usize

Implementors§