pub struct Buffer<P> where
P: SharedPointerKind, {
pub info: BufferInfo,
pub name: Option<String>,
/* private fields */
}Fields
info: BufferInfoname: Option<String>Implementations
sourceimpl<P> Buffer<P> where
P: SharedPointerKind,
impl<P> Buffer<P> where
P: SharedPointerKind,
pub fn create(
device: &SharedPointer<Device<P>, P>,
info: impl Into<BufferInfo>
) -> Result<Self, DriverError>
pub fn copy_from_slice(this: &mut Self, offset: DeviceSize, slice: &[u8])
pub fn device_address(this: &Self) -> DeviceAddress
sourcepub fn mapped_ptr<T>(this: &Self) -> *mut T
pub fn mapped_ptr<T>(this: &Self) -> *mut T
Returns a valid mapped pointer if the memory is host visible, otherwise it will panic.
Trait Implementations
sourceimpl<P> Bind<&'_ mut RenderGraph<P>, BufferNode<P>, P> for Buffer<P> where
P: SharedPointerKind,
impl<P> Bind<&'_ mut RenderGraph<P>, BufferNode<P>, P> for Buffer<P> where
P: SharedPointerKind,
fn bind(self, graph: &mut RenderGraph<P>) -> BufferNode<P>
sourceimpl<P> Debug for Buffer<P> where
P: SharedPointerKind,
impl<P> Debug for Buffer<P> where
P: SharedPointerKind,
sourceimpl<P> Deref for Buffer<P> where
P: SharedPointerKind,
impl<P> Deref for Buffer<P> where
P: SharedPointerKind,
Auto Trait Implementations
impl<P> !RefUnwindSafe for Buffer<P>
impl<P> Send for Buffer<P> where
P: Send,
impl<P> Sync for Buffer<P> where
P: Sync,
impl<P> Unpin for Buffer<P> where
P: Unpin,
impl<P> !UnwindSafe for Buffer<P>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more