#[repr(transparent)]pub struct MTLSamplerAddressMode(pub NSUInteger);Available on crate feature
MTLSampler only.Expand description
Options for what value is returned when a fetch falls outside the bounds of a texture.
Texture coordinates will be clamped between 0 and 1.
Mirror the texture while coordinates are within -1..1, and clamp to edge when outside.
Wrap to the other side of the texture, effectively ignoring fractional parts of the texture coordinate.
Between -1 and 1 the texture is mirrored across the 0 axis. The image is repeated outside of that range.
ClampToZero returns transparent zero (0,0,0,0) for images with an alpha channel, and returns opaque zero (0,0,0,1) for images without an alpha channel.
Clamp to border color returns the value specified by the borderColor variable of the MTLSamplerDesc.
See also Apple’s documentation
Tuple Fields§
§0: NSUIntegerImplementations§
Source§impl MTLSamplerAddressMode
impl MTLSamplerAddressMode
pub const ClampToEdge: Self
pub const MirrorClampToEdge: Self
pub const Repeat: Self
pub const MirrorRepeat: Self
pub const ClampToZero: Self
pub const ClampToBorderColor: Self
Trait Implementations§
Source§impl Clone for MTLSamplerAddressMode
impl Clone for MTLSamplerAddressMode
Source§fn clone(&self) -> MTLSamplerAddressMode
fn clone(&self) -> MTLSamplerAddressMode
Returns a duplicate 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 MTLSamplerAddressMode
impl Debug for MTLSamplerAddressMode
Source§impl Encode for MTLSamplerAddressMode
impl Encode for MTLSamplerAddressMode
Source§impl Hash for MTLSamplerAddressMode
impl Hash for MTLSamplerAddressMode
Source§impl Ord for MTLSamplerAddressMode
impl Ord for MTLSamplerAddressMode
Source§fn cmp(&self, other: &MTLSamplerAddressMode) -> Ordering
fn cmp(&self, other: &MTLSamplerAddressMode) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for MTLSamplerAddressMode
impl PartialEq for MTLSamplerAddressMode
Source§impl PartialOrd for MTLSamplerAddressMode
impl PartialOrd for MTLSamplerAddressMode
Source§impl RefEncode for MTLSamplerAddressMode
impl RefEncode for MTLSamplerAddressMode
Source§const ENCODING_REF: Encoding
const ENCODING_REF: Encoding
The Objective-C type-encoding for a reference of this type. Read more
impl Copy for MTLSamplerAddressMode
impl Eq for MTLSamplerAddressMode
impl StructuralPartialEq for MTLSamplerAddressMode
Auto Trait Implementations§
impl Freeze for MTLSamplerAddressMode
impl RefUnwindSafe for MTLSamplerAddressMode
impl Send for MTLSamplerAddressMode
impl Sync for MTLSamplerAddressMode
impl Unpin for MTLSamplerAddressMode
impl UnwindSafe for MTLSamplerAddressMode
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> EncodeArgument for Twhere
T: Encode,
impl<T> EncodeArgument for Twhere
T: Encode,
Source§const ENCODING_ARGUMENT: Encoding = T::ENCODING
const ENCODING_ARGUMENT: Encoding = T::ENCODING
The Objective-C type-encoding for this type.
Source§impl<T> EncodeReturn for Twhere
T: Encode,
impl<T> EncodeReturn for Twhere
T: Encode,
Source§const ENCODING_RETURN: Encoding = T::ENCODING
const ENCODING_RETURN: Encoding = T::ENCODING
The Objective-C type-encoding for this type.