[][src]Trait abistr::TryIntoAsOptCStr

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

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

Associated Types

type Target: AsOptCStr[src]

The temporary type that can be treated as an Optional 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> TryIntoAsOptCStr for &'s str[src]

type Target = CString

impl TryIntoAsOptCStr for String[src]

type Target = CString

impl<'s> TryIntoAsOptCStr for Option<&'s str>[src]

type Target = Option<CString>

impl TryIntoAsOptCStr for Option<String>[src]

type Target = Option<CString>

Loading content...

Implementors

impl<T: AsOptCStr> TryIntoAsOptCStr for T[src]

type Target = T

Loading content...