[−][src]Trait abistr::AsOptCStr
Treat self
as a C-style string or null()
Safety
By implementing this trait, you promise that:
- The returned pointer is either
null()
, or points to a\0
-terminated string. - If pointing to a string, said string remains valid and immutable until
self
is dropped or a&mut self
method is called.
Required methods
pub fn as_opt_cstr(&self) -> *const c_char
[src]
Returns a \0
-terminated C string, or null()
.