Struct draw2d::graphics::vulkan::device_allocator::ForcedOffsetAllocator [−][src]
pub struct ForcedOffsetAllocator<Alloc: DeviceAllocator> { /* fields omitted */ }
Expand description
An allocator which forces all allocations to have a fixed offset.
This has little practical use, but is convenient when verifying that other parts of the code properly handle allocation offsets.
Implementations
Trait Implementations
Use the underlying allocator implementation to allocate an oversized piece of memory, then set an offset to compensate.
This has no practical use other than proving that code properly handles memory offsets.
Undo the offset+size adjustments which were applied by Self::allocate, then use the underlying allocator to actually free the memory.
Auto Trait Implementations
impl<Alloc> RefUnwindSafe for ForcedOffsetAllocator<Alloc> where
Alloc: RefUnwindSafe,
impl<Alloc> Send for ForcedOffsetAllocator<Alloc> where
Alloc: Send,
impl<Alloc> Sync for ForcedOffsetAllocator<Alloc> where
Alloc: Sync,
impl<Alloc> Unpin for ForcedOffsetAllocator<Alloc> where
Alloc: Unpin,
impl<Alloc> UnwindSafe for ForcedOffsetAllocator<Alloc> where
Alloc: UnwindSafe,
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.