Skip to main content

GPUBufferMethods

pub trait GPUBufferMethods<D: DomTypes> {
    // Required methods
    fn Size(&self) -> u64;
    fn Usage(&self) -> u32;
    fn MapState(&self) -> GPUBufferMapState;
    fn MapAsync(
        &self,
        realm: &mut CurrentRealm<'_>,
        mode: u32,
        offset: u64,
        size: Option<u64>,
    ) -> Rc<D::Promise>;
    fn GetMappedRange(
        &self,
        cx: &mut JSContext,
        offset: u64,
        size: Option<u64>,
    ) -> Fallible<RootedTraceableBox<HeapArrayBuffer>>;
    fn Unmap(&self, cx: &mut JSContext);
    fn Destroy(&self, cx: &mut JSContext);
    fn Label(&self) -> USVString;
    fn SetLabel(&self, value: USVString);
}

Required Methods§

Source

fn Size(&self) -> u64

Source

fn Usage(&self) -> u32

Source

fn MapState(&self) -> GPUBufferMapState

Source

fn MapAsync( &self, realm: &mut CurrentRealm<'_>, mode: u32, offset: u64, size: Option<u64>, ) -> Rc<D::Promise>

Source

fn GetMappedRange( &self, cx: &mut JSContext, offset: u64, size: Option<u64>, ) -> Fallible<RootedTraceableBox<HeapArrayBuffer>>

Source

fn Unmap(&self, cx: &mut JSContext)

Source

fn Destroy(&self, cx: &mut JSContext)

Source

fn Label(&self) -> USVString

Source

fn SetLabel(&self, value: USVString)

Implementors§