Enum wgpu_types::AddressMode
source · #[repr(C)]pub enum AddressMode {
ClampToEdge = 0,
Repeat = 1,
MirrorRepeat = 2,
ClampToBorder = 3,
}
Expand description
How edges should be handled in texture addressing.
Corresponds to WebGPU GPUAddressMode
.
Variants§
ClampToEdge = 0
Clamp the value to the edge of the texture
-0.25 -> 0.0 1.25 -> 1.0
Repeat = 1
Repeat the texture in a tiling fashion
-0.25 -> 0.75 1.25 -> 0.25
MirrorRepeat = 2
Repeat the texture, mirroring it every repeat
-0.25 -> 0.25 1.25 -> 0.75
ClampToBorder = 3
Clamp the value to the border of the texture
Requires feature Features::ADDRESS_MODE_CLAMP_TO_BORDER
-0.25 -> border 1.25 -> border
Trait Implementations§
source§impl Clone for AddressMode
impl Clone for AddressMode
source§fn clone(&self) -> AddressMode
fn clone(&self) -> AddressMode
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for AddressMode
impl Debug for AddressMode
source§impl Default for AddressMode
impl Default for AddressMode
source§fn default() -> AddressMode
fn default() -> AddressMode
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for AddressMode
impl<'de> Deserialize<'de> for AddressMode
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Hash for AddressMode
impl Hash for AddressMode
source§impl PartialEq for AddressMode
impl PartialEq for AddressMode
source§fn eq(&self, other: &AddressMode) -> bool
fn eq(&self, other: &AddressMode) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for AddressMode
impl Serialize for AddressMode
impl Copy for AddressMode
impl Eq for AddressMode
impl StructuralPartialEq for AddressMode
Auto Trait Implementations§
impl Freeze for AddressMode
impl RefUnwindSafe for AddressMode
impl Send for AddressMode
impl Sync for AddressMode
impl Unpin for AddressMode
impl UnwindSafe for AddressMode
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