Struct cl_generic_vec::raw::Heap [−][src]
This is supported on crate feature
alloc only.Expand description
A heap storage that can reallocate if necessary,
Usable with the alloc feature
The allocator type paramter is only available on nightly
Implementations
This is supported on crate feature nightly only.
This is supported on crate feature
nightly only.Create a new zero-capacity heap vector with the given allocator
This is supported on crate feature nightly only.
This is supported on crate feature
nightly only.Create a new Heap<T>storage from the given pointer and capacity
Safety
If the capacity is non-zero
- You must have allocated the pointer from the given allocator
- The pointer must be valid to read-write for the range
ptr..ptr.add(capacity)
Trait Implementations
Is the pointer from as_ptr guaranteed to be aligned to T Read more
The number of elements that it is valid to write to this Storage Read more
Returns a mutable pointer to the first element
Reserves space for at least new_capacity elements Read more
Tries to reserve space for at least new_capacity elements Read more
Creates a new storage with at least the given storage capacity
