Struct x11rb::utils::CSlice[][src]

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.

Implementations

Constructs a new CSlice from the given parts. libc::free will be called on the given pointer when the slice is dropped.

Safety

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.

Trait Implementations

Performs the conversion.

Formats the value using the given formatter. Read more

The resulting type after dereferencing.

Dereferences the value.

Executes the destructor for this type. Read more

The returned type after indexing.

Performs the indexing (container[index]) operation. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.