Skip to main content

QueueWriteBufferView

Struct QueueWriteBufferView 

Source
pub struct QueueWriteBufferView { /* private fields */ }
Expand description

A write-only view into a staging buffer.

This type is what Queue::write_buffer_with() returns.

Implementations§

Source§

impl QueueWriteBufferView

Source

pub fn as_custom<T: QueueWriteBufferInterface>(&self) -> Option<&T>

Available on 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.

Source

pub fn len(&self) -> usize

Returns the length of this view; the number of bytes to be written.

Source

pub fn is_empty(&self) -> bool

Returns true if the view has a length of 0.

Source

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.

Source

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§

Source§

impl Drop for QueueWriteBufferView

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more

Auto Trait Implementations§

§

impl !RefUnwindSafe for QueueWriteBufferView

§

impl !UnwindSafe for QueueWriteBufferView

§

impl Forget for QueueWriteBufferView

§

impl Freeze for QueueWriteBufferView
where *const ArcInner<CoreQueue> is !null: Freeze, PhantomData<ArcInner<CoreQueue>>: Freeze, *const ArcInner<dyn QueueInterface> is !null: Freeze, PhantomData<ArcInner<dyn QueueInterface>>: Freeze, *const ArcInner<CoreBuffer> is !null: Freeze, PhantomData<ArcInner<CoreBuffer>>: Freeze, *const ArcInner<dyn BufferInterface> is !null: Freeze, PhantomData<ArcInner<dyn BufferInterface>>: Freeze, *const ArcInner<Mutex<MapContext>> is !null: Freeze, PhantomData<ArcInner<Mutex<MapContext>>>: Freeze, InternalBitFlags: Freeze, NonZero<u64>: Freeze, PhantomData<StagingBuffer>: Freeze, *const u8 is !null: Freeze, *const ArcInner<dyn QueueWriteBufferInterface> is !null: Freeze, PhantomData<ArcInner<dyn QueueWriteBufferInterface>>: Freeze,

§

impl Move for QueueWriteBufferView

§

impl Send for QueueWriteBufferView
where Arc<CoreQueue>: Send, Arc<dyn QueueInterface>: Send, Arc<CoreBuffer>: Send, Arc<dyn BufferInterface>: Send, Arc<Mutex<MapContext>>: Send, InternalBitFlags: Send, NonZero<u64>: Send, CoreBufferMappedRange: Send, Arc<dyn QueueWriteBufferInterface>: Send,

§

impl Sync for QueueWriteBufferView
where Arc<CoreQueue>: Sync, Arc<dyn QueueInterface>: Sync, Arc<CoreBuffer>: Sync, Arc<dyn BufferInterface>: Sync, Arc<Mutex<MapContext>>: Sync, InternalBitFlags: Sync, NonZero<u64>: Sync, CoreBufferMappedRange: Sync, Arc<dyn QueueWriteBufferInterface>: Sync,

§

impl Unpin for QueueWriteBufferView
where Arc<CoreQueue>: Unpin, Arc<dyn QueueInterface>: Unpin, Arc<CoreBuffer>: Unpin, Arc<dyn BufferInterface>: Unpin, Arc<Mutex<MapContext>>: Unpin, InternalBitFlags: Unpin, NonZero<u64>: Unpin, *const u8 is !null: Unpin, Arc<dyn QueueWriteBufferInterface>: Unpin,

§

impl UnsafeUnpin for QueueWriteBufferView
where *const ArcInner<CoreQueue> is !null: UnsafeUnpin, PhantomData<ArcInner<CoreQueue>>: UnsafeUnpin, *const ArcInner<dyn QueueInterface> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn QueueInterface>>: UnsafeUnpin, *const ArcInner<CoreBuffer> is !null: UnsafeUnpin, PhantomData<ArcInner<CoreBuffer>>: UnsafeUnpin, *const ArcInner<dyn BufferInterface> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn BufferInterface>>: UnsafeUnpin, *const ArcInner<Mutex<MapContext>> is !null: UnsafeUnpin, PhantomData<ArcInner<Mutex<MapContext>>>: UnsafeUnpin, InternalBitFlags: UnsafeUnpin, NonZeroU64Inner: UnsafeUnpin, PhantomData<StagingBuffer>: UnsafeUnpin, *const u8 is !null: UnsafeUnpin, *const ArcInner<dyn QueueWriteBufferInterface> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn QueueWriteBufferInterface>>: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> AsAny for T
where T: 'static,

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,