pub struct CSlice { /* fields omitted */ }
Expand description
Wrapper around a slice that was allocated in C code.
CSlice
is only available when the allow-unsafe-code
feature is enabled.
Constructs a new CSlice
from the given parts. libc::free
will be called on the given
pointer when the slice is dropped.
The same rules as for std::slice::from_raw_parts
apply. Additionally, the given pointer
must be safe to free with libc::free
.
Convert self
into a raw part.
Ownership of the returned pointer is given to the caller. Specifically, libc::free
will
not be called on it by CSlice
.
Formats the value using the given formatter. Read more
The resulting type after dereferencing.
Executes the destructor for this type. Read more
The returned type after indexing.
Performs the indexing (container[index]
) operation. Read more
impl<T> Any for T where
T: 'static + ?Sized,
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
impl<T, U> Into<U> for T where
U: From<T>,
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.