[][src]Trait abistr::TryIntoAsCStr

pub trait TryIntoAsCStr {
    type Target: AsCStr;
    pub fn try_into(self) -> Result<Self::Target, NulError>;
}

Converts self (str/String/CStr/CString) into something that implements AsCStr

Associated Types

type Target: AsCStr[src]

The temporary type that can be treated as a C-string.

Loading content...

Required methods

pub fn try_into(self) -> Result<Self::Target, NulError>[src]

Attempt to convert to Self::Target. May fail if self contains \0s.

Loading content...

Implementations on Foreign Types

impl<'s> TryIntoAsCStr for &'s str[src]

type Target = CString

impl TryIntoAsCStr for String[src]

type Target = CString

Loading content...

Implementors

impl<T: AsCStr> TryIntoAsCStr for T[src]

type Target = T

Loading content...