pub struct QueueWriteBufferView {
queue: Queue,
buffer: Buffer,
offset: BufferAddress,
inner: DispatchQueueWriteBuffer,
}Expand description
A write-only view into a staging buffer.
This type is what Queue::write_buffer_with() returns.
Fields§
§queue: Queue§buffer: Buffer§offset: BufferAddress§inner: DispatchQueueWriteBufferImplementations§
Source§impl QueueWriteBufferView
impl QueueWriteBufferView
Sourcepub fn as_custom<T: QueueWriteBufferInterface>(&self) -> Option<&T>
Available on custom only.
pub fn as_custom<T: QueueWriteBufferInterface>(&self) -> Option<&T>
custom only.Returns custom implementation of QueueWriteBufferView (if custom backend and is internally T)
Source§impl QueueWriteBufferView
These methods are equivalent to the methods of the same names on WriteOnly.
impl QueueWriteBufferView
These methods are equivalent to the methods of the same names on WriteOnly.
Sourcepub fn slice<'a, S: RangeBounds<usize>>(
&'a mut self,
bounds: S,
) -> WriteOnly<'a, [u8]>
pub fn slice<'a, S: RangeBounds<usize>>( &'a mut self, bounds: S, ) -> WriteOnly<'a, [u8]>
Returns a WriteOnly reference to a portion of this.
.slice(..) can be used to access the whole data.
Sourcepub fn copy_from_slice(&mut self, src: &[u8])
pub fn copy_from_slice(&mut self, src: &[u8])
Copies all elements from src into self.
The length of src must be the same as self.
This method is equivalent to
self.slice(..).copy_from_slice(src).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for QueueWriteBufferView
impl !RefUnwindSafe for QueueWriteBufferView
impl Send for QueueWriteBufferView
impl Sync for QueueWriteBufferView
impl Unpin for QueueWriteBufferView
impl !UnwindSafe for QueueWriteBufferView
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more