Objects that can be interpreted as CStrs.
trait AsCStr : ToCStr + AsRef<[u8]> {
/* Required methods */
fn as_cstr(&self) -> Result<&CStr, Errno>
}| Receiver | Name | Description |
|---|---|---|
&self | as_cstr | Borrows the object as a |
This operation can fail if the object has interior null bytes, e.g., "Hello World\0\0\0" will succeed but "Hello\0World\0" will fail.