Type Alias ffi_types::CharStrRef
source · pub type CharStrRef = SliceRef<c_char>;Expand description
not related to std::ffi::CStr or std::ffi::CString
Aliased Type§
struct CharStrRef(/* private fields */);Implementations§
source§impl CharStrRef
impl CharStrRef
pub fn as_bytes(&self) -> &[u8] ⓘ
pub fn to_str(&self) -> Result<&str, Utf8Error>
pub fn unwrap_str(&self) -> &str
pub fn expect_str(&self, msg: &str) -> &str
sourcepub unsafe fn into_rust_unchecked(self) -> StrRef
pub unsafe fn into_rust_unchecked(self) -> StrRef
§Safety
self must be a valid utf-8 string.