pub trait MewSampler {
// Required methods
fn new(buffer: Sampler) -> Self;
fn binding_type() -> BindingType;
fn buffer_desc() -> SamplerDescriptor<'static>;
fn as_binding<'a>(&'a self) -> BindingResource<'a>;
}Expand description
Trait for internal use to work with samplers.
Required Methods§
Sourcefn new(buffer: Sampler) -> Self
fn new(buffer: Sampler) -> Self
Build this sampler type from a
wgpu::Sampler.
Sourcefn binding_type() -> BindingType
fn binding_type() -> BindingType
Get a wgpu::BindingType
to use for this type of sampler.
Sourcefn buffer_desc() -> SamplerDescriptor<'static>
fn buffer_desc() -> SamplerDescriptor<'static>
Get a wgpu::SamplerDescriptor
to build this type of sampler.
Sourcefn as_binding<'a>(&'a self) -> BindingResource<'a>
fn as_binding<'a>(&'a self) -> BindingResource<'a>
Get this sampler’s wgpu::BindingResource
to bind it in a bind group.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.