Enum wgpu::AddressMode
#[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§
§impl Clone for AddressMode
impl Clone for AddressMode
§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 more§impl Debug for AddressMode
impl Debug for AddressMode
§impl Default for AddressMode
impl Default for AddressMode
§fn default() -> AddressMode
fn default() -> AddressMode
Returns the “default value” for a type. Read more
§impl<'de> Deserialize<'de> for AddressMode
impl<'de> Deserialize<'de> for AddressMode
§fn deserialize<__D>(
__deserializer: __D
) -> Result<AddressMode, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<AddressMode, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl Hash for AddressMode
impl Hash for AddressMode
§impl PartialEq for AddressMode
impl PartialEq for AddressMode
§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 ==
.§impl Serialize for AddressMode
impl Serialize for AddressMode
§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for AddressMode
impl Eq for AddressMode
impl StructuralEq for AddressMode
impl StructuralPartialEq for AddressMode
Auto Trait Implementations§
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more