pub trait BufferMappedRangeInterface: CommonTraits {
// Required methods
fn len(&self) -> usize;
unsafe fn read_slice(&self) -> &[u8] ⓘ;
unsafe fn write_slice(&mut self) -> WriteOnly<'_, [u8]>;
fn as_uint8array(&self) -> &Uint8Array;
}Available on
custom only.Required Methods§
fn len(&self) -> usize
Sourceunsafe fn read_slice(&self) -> &[u8] ⓘ
unsafe fn read_slice(&self) -> &[u8] ⓘ
§Safety
Must only be used on read, not write, mappings.
Sourceunsafe fn write_slice(&mut self) -> WriteOnly<'_, [u8]>
unsafe fn write_slice(&mut self) -> WriteOnly<'_, [u8]>
§Safety
Must only be used on write, not read, mappings.
fn as_uint8array(&self) -> &Uint8Array
Available on
webgpu only.Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".