pub struct Sampler { /* private fields */ }
Expand description
Handle to a sampler.
A Sampler
object defines how a pipeline will sample from a TextureView
. Samplers define
image filters (including anisotropy) and address (wrapping) modes, among other things. See
the documentation for SamplerDescriptor
for more information.
It can be created with Device::create_sampler
.
Corresponds to WebGPU GPUSampler
.
Implementations§
Source§impl Sampler
impl Sampler
Sourcepub fn global_id(&self) -> Id<Sampler>
Available on crate feature expose-ids
only.
pub fn global_id(&self) -> Id<Sampler>
expose-ids
only.Returns a globally-unique identifier for this Sampler
.
Calling this method multiple times on the same object will always return the same value.
The returned value is guaranteed to be unique among all Sampler
s created from the same
Instance
.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Sampler
impl !RefUnwindSafe for Sampler
impl Send for Sampler
impl Sync for Sampler
impl Unpin for Sampler
impl !UnwindSafe for Sampler
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