Struct draw2d::graphics::vulkan::device_allocator::PassthroughAllocator [−][src]
pub struct PassthroughAllocator { /* fields omitted */ }
Expand description
An allocator implementation which just directly allocates a new piece of device memory on each call.
This allocator is stateles and can be cheaply cloned when building allocators which decorate this behavior.
Implementations
Trait Implementations
Directly allocate device memory onto the heap indicated by the
memory type index of the allocate_info
struct.
Free the allocation’s underlying memory.
unsafe because
- it is the responsibility of the caller to ensure the allocation’s device memory is no longer in use
- this includes other allocations which reference the same piece of memory! Don’t double-free!
Auto Trait Implementations
impl RefUnwindSafe for PassthroughAllocator
impl Send for PassthroughAllocator
impl Sync for PassthroughAllocator
impl Unpin for PassthroughAllocator
impl UnwindSafe for PassthroughAllocator
Blanket Implementations
Mutably borrows from an owned value. Read more
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
Checks if self
is actually part of its subset T
(and can be converted to it).
Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
The inclusion map: converts self
to the equivalent element of its superset.