pub struct Allocation { /* private fields */ }

Implementations§

Returns the ID3D12Heap object that is backing this allocation. This heap object can be shared with multiple other allocations and shouldn’t be freed (or allocated from) without this library, because that will lead to undefined behavior.

Safety

The result of this function be safely passed into ID3D12Device::CreatePlacedResource(). It is exposed for this reason. Keep in mind to also pass Self::offset() along to it.

Returns the offset of the allocation on the ID3D12Heap. When creating a placed resources, this offset needs to be supplied as well.

Returns the size of the allocation

Trait Implementations§

Formats the value using the given formatter. 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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.