#[repr(transparent)]pub struct CStr(_);
A string that is guaranteed to have exactly one
NUL byte, which is at the
Used for interoperability with kernel APIs that take C strings.
Returns the length of this string excluding
Returns the length of this string with
true if the string only includes
Wraps a raw C string pointer.
ptr must be a valid pointer to a
NUL-terminated C string, and it must
last at least
CStr is alive, the memory pointed by
must not be mutated.
CStr from a
The provided slice must be
NUL-terminated, does not contain any
Returns a C pointer to the string.
Convert the string to a byte slice without the trailing 0 byte.
Convert the string to a byte slice containing the trailing 0 byte.
Performs the conversion.
The resulting type after dereferencing.
Dereferences the value.