pub struct NullDevice { /* private fields */ }Expand description
A device that does nothing. Every call is a successful no-op.
Implementations§
Source§impl NullDevice
impl NullDevice
Trait Implementations§
Source§impl Default for NullDevice
impl Default for NullDevice
Source§impl GpuDevice for NullDevice
impl GpuDevice for NullDevice
fn create_buffer(&mut self, _size: usize, _usage: BufferUsage) -> BufferHandle
fn create_texture( &mut self, _w: u32, _h: u32, _fmt: TextureFormat, ) -> TextureHandle
fn create_shader(&mut self, _src: &str, _stage: ShaderStage) -> ShaderHandle
fn create_pipeline(&mut self, _desc: &RenderPipelineDesc) -> PipelineHandle
fn create_compute_pipeline( &mut self, _desc: &ComputePipelineDesc, ) -> ComputePipelineHandle
fn write_buffer(&mut self, _buf: BufferHandle, _off: usize, _data: &[u8])
fn read_buffer(&self, _buf: BufferHandle) -> Vec<u8> ⓘ
fn write_texture(&mut self, _tex: TextureHandle, _data: &[u8])
fn begin_render_pass( &mut self, _color: &[TextureHandle], _depth: Option<TextureHandle>, )
fn end_render_pass(&mut self)
fn begin_compute_pass(&mut self)
fn end_compute_pass(&mut self)
fn set_pipeline(&mut self, _p: PipelineHandle)
fn set_vertex_buffer(&mut self, _slot: u32, _buf: BufferHandle)
fn set_index_buffer(&mut self, _buf: BufferHandle)
fn set_bind_group(&mut self, _idx: u32, _grp: &BindGroup)
fn draw(&mut self, _vc: u32, _ic: u32)
fn draw_indexed(&mut self, _ic: u32, _inst: u32)
fn draw_indirect(&mut self, _buf: BufferHandle, _off: u64)
fn set_compute_pipeline(&mut self, _p: ComputePipelineHandle)
fn dispatch_workgroups(&mut self, _x: u32, _y: u32, _z: u32)
fn dispatch_indirect(&mut self, _buf: BufferHandle, _off: u64)
fn destroy_buffer(&mut self, _buf: BufferHandle)
fn destroy_texture(&mut self, _tex: TextureHandle)
fn name(&self) -> &str
Auto Trait Implementations§
impl !Freeze for NullDevice
impl RefUnwindSafe for NullDevice
impl Send for NullDevice
impl Sync for NullDevice
impl Unpin for NullDevice
impl UnsafeUnpin for NullDevice
impl UnwindSafe for NullDevice
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.