Type Alias ffi_types::CharStrRef

source ·
pub type CharStrRef = SliceRef<c_char>;
Expand description

Aliased Type§

struct CharStrRef(/* private fields */);

Implementations§

source§

impl CharStrRef

source

pub fn as_bytes(&self) -> &[u8]

source

pub fn to_str(&self) -> Result<&str, Utf8Error>

source

pub fn unwrap_str(&self) -> &str

source

pub fn expect_str(&self, msg: &str) -> &str

source

pub unsafe fn into_rust_unchecked(self) -> StrRef

§Safety

self must be a valid utf-8 string.

source

pub fn into_rust(self) -> Result<StrRef, Utf8Error>