pub struct BufferDescriptor {
pub id: BufferId,
pub size_bytes: usize,
pub name: Option<String>,
pub external: bool,
pub alignment: usize,
}Expand description
Metadata describing a logical device buffer in the graph.
Buffers are abstract references to device memory regions. The memory planner uses buffer descriptors to assign physical allocations while maximising reuse across non-overlapping lifetimes.
Fields§
§id: BufferIdUnique identifier.
size_bytes: usizeSize in bytes.
name: Option<String>Optional human-readable name.
external: boolIf true, this buffer is externally managed (not handled by the planner).
alignment: usizeRequired alignment in bytes (must be a power of two).
Implementations§
Source§impl BufferDescriptor
impl BufferDescriptor
Sourcepub fn with_alignment(self, align: usize) -> Self
pub fn with_alignment(self, align: usize) -> Self
Sets the buffer’s required alignment (builder pattern).
§Panics
Panics in debug builds if align is not a power of two or is zero.
Trait Implementations§
Source§impl Clone for BufferDescriptor
impl Clone for BufferDescriptor
Source§fn clone(&self) -> BufferDescriptor
fn clone(&self) -> BufferDescriptor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BufferDescriptor
impl Debug for BufferDescriptor
Auto Trait Implementations§
impl Freeze for BufferDescriptor
impl RefUnwindSafe for BufferDescriptor
impl Send for BufferDescriptor
impl Sync for BufferDescriptor
impl Unpin for BufferDescriptor
impl UnsafeUnpin for BufferDescriptor
impl UnwindSafe for BufferDescriptor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more