pub struct AllocatedBuffer<B> { /* private fields */ }Expand description
A newly allocated native buffer handle and its verified backing properties.
Device implementations should retain info in their object record and pass only buffer to
backend hot paths.
Implementations§
Source§impl<B> AllocatedBuffer<B>
impl<B> AllocatedBuffer<B>
pub const fn new(buffer: B, info: BufferInfo) -> Self
pub const fn buffer(&self) -> &B
pub fn buffer_mut(&mut self) -> &mut B
pub const fn info(&self) -> BufferInfo
pub fn into_parts(self) -> (B, BufferInfo)
Trait Implementations§
Auto Trait Implementations§
impl<B> Freeze for AllocatedBuffer<B>where
B: Freeze,
impl<B> RefUnwindSafe for AllocatedBuffer<B>where
B: RefUnwindSafe,
impl<B> Send for AllocatedBuffer<B>where
B: Send,
impl<B> Sync for AllocatedBuffer<B>where
B: Sync,
impl<B> Unpin for AllocatedBuffer<B>where
B: Unpin,
impl<B> UnsafeUnpin for AllocatedBuffer<B>where
B: UnsafeUnpin,
impl<B> UnwindSafe for AllocatedBuffer<B>where
B: UnwindSafe,
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