[][src]Struct cstrptr::CStrPtr

#[repr(transparent)]
pub struct CStrPtr<'a> { /* fields omitted */ }

Methods

impl<'a> CStrPtr<'a>[src]

pub const fn from_c_str(str: &'a CStr) -> Self[src]

pub const unsafe fn from_ptr(ptr: *const c_char) -> Self[src]

pub fn from_bytes_with_nul(
    bytes: &'a [u8]
) -> Result<Self, FromBytesWithNulError>
[src]

pub const unsafe fn from_bytes_with_nul_unchecked(bytes: &'a [u8]) -> Self[src]

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

pub fn to_bytes(self) -> &'a [u8][src]

pub fn to_bytes_with_nul(self) -> &'a [u8][src]

pub fn to_c_str(self) -> &'a CStr[src]

pub fn to_str(self) -> Result<&'a str, Utf8Error>[src]

pub fn to_string_lossy(self) -> Cow<'a, str>[src]

Trait Implementations

impl<'a> Send for CStrPtr<'a>[src]

impl<'a> Eq for CStrPtr<'a>[src]

impl<'a> Sync for CStrPtr<'a>[src]

impl<'a> Clone for CStrPtr<'a>[src]

impl<'a> AsRef<CStr> for CStrPtr<'a>[src]

impl<'a> PartialOrd<CStrPtr<'a>> for CStrPtr<'a>[src]

impl<'a> PartialEq<CStrPtr<'a>> for CStrPtr<'a>[src]

impl<'a> Ord for CStrPtr<'a>[src]

impl<'a> From<CStrPtr<'a>> for &'a CStr[src]

impl<'a> From<&'a CStr> for CStrPtr<'a>[src]

impl<'a> Copy for CStrPtr<'a>[src]

Auto Trait Implementations

impl<'a> Unpin for CStrPtr<'a>

impl<'a> UnwindSafe for CStrPtr<'a>

impl<'a> RefUnwindSafe for CStrPtr<'a>

Blanket Implementations

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]