#[repr(C)]pub struct BufferBinding<B = BufferId> {
pub buffer: B,
pub offset: BufferAddress,
pub size: Option<BufferAddress>,
}Fields§
§buffer: B§offset: BufferAddress§size: Option<BufferAddress>Size of the binding. If None, the binding spans from offset to the
end of the buffer.
We use BufferAddress to allow a size of zero on this wgpu_core type,
because JavaScript bindings cannot readily express Option<NonZeroU64>.
The wgpu API uses Option<BufferSize> (i.e. NonZeroU64) for this
field.
Trait Implementations§
Source§impl<B: Clone> Clone for BufferBinding<B>
impl<B: Clone> Clone for BufferBinding<B>
Source§fn clone(&self) -> BufferBinding<B>
fn clone(&self) -> BufferBinding<B>
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<B: Debug> Debug for BufferBinding<B>
impl<B: Debug> Debug for BufferBinding<B>
Source§impl<'de, B> Deserialize<'de> for BufferBinding<B>where
B: Deserialize<'de>,
impl<'de, B> Deserialize<'de> for BufferBinding<B>where
B: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<B: Hash> Hash for BufferBinding<B>
impl<B: Hash> Hash for BufferBinding<B>
Source§impl<B: PartialEq> PartialEq for BufferBinding<B>
impl<B: PartialEq> PartialEq for BufferBinding<B>
Source§impl<B> Serialize for BufferBinding<B>where
B: Serialize,
impl<B> Serialize for BufferBinding<B>where
B: Serialize,
impl<B: Eq> Eq for BufferBinding<B>
impl<B> StructuralPartialEq for BufferBinding<B>
Auto Trait Implementations§
impl<B> Freeze for BufferBinding<B>where
B: Freeze,
impl<B> RefUnwindSafe for BufferBinding<B>where
B: RefUnwindSafe,
impl<B> Send for BufferBinding<B>where
B: Send,
impl<B> Sync for BufferBinding<B>where
B: Sync,
impl<B> Unpin for BufferBinding<B>where
B: Unpin,
impl<B> UnwindSafe for BufferBinding<B>where
B: UnwindSafe,
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.