MTLDataType

Struct MTLDataType 

Source
#[repr(transparent)]
pub struct MTLDataType(pub NSUInteger);
Available on crate feature MTLDataType only.
Expand description

An enumeration of the different data types in Metal.

See also Apple’s documentation

Tuple Fields§

§0: NSUInteger

Implementations§

Source§

impl MTLDataType

Source

pub const None: Self

Represents no data type.

Source

pub const Struct: Self

Represents a struct data type.

Source

pub const Array: Self

Represents an array data type.

Source

pub const Float: Self

Represents a data type consisting of a single floating-point value.

Source

pub const Float2: Self

Represents a data type consisting of a vector of two floating-point values.

Source

pub const Float3: Self

Represents a data type consisting of a vector of three floating-point values.

Source

pub const Float4: Self

Represents a data type consisting of a vector of four floating-point values.

Source

pub const Float2x2: Self

Represents a data type consisting of a 2x2 floating-point matrix.

Source

pub const Float2x3: Self

Represents a data type consisting of a 2x3 floating-point matrix.

Source

pub const Float2x4: Self

Represents a data type consisting of a 2x4 floating-point matrix.

Source

pub const Float3x2: Self

Represents a data type consisting of a 3x2 floating-point matrix.

Source

pub const Float3x3: Self

Represents a data type consisting of a 3x3 floating-point matrix.

Source

pub const Float3x4: Self

Represents a data type consisting of a 3x4 floating-point matrix.

Source

pub const Float4x2: Self

Represents a data type consisting of a 4x2 floating-point matrix.

Source

pub const Float4x3: Self

Represents a data type consisting of a 4x3 floating-point matrix.

Source

pub const Float4x4: Self

Represents a data type consisting of a 4x4 floating-point matrix.

Source

pub const Half: Self

Represents a data type consisting of a half-precision floating-point value.

Source

pub const Half2: Self

Represents a data type consisting of a vector of two half-precision floating-point values.

Source

pub const Half3: Self

Represents a data type consisting of a vector of three half-precision floating-point values.

Source

pub const Half4: Self

Represents a data type consisting of a vector of four half-precision floating-point values.

Source

pub const Half2x2: Self

Represents a data type consisting of a 2x2 half-precision floating-point matrix.

Source

pub const Half2x3: Self

Represents a data type consisting of a 2x3 half-precision floating-point matrix.

Source

pub const Half2x4: Self

Represents a data type consisting of a 2x4 half-precision floating-point matrix.

Source

pub const Half3x2: Self

Represents a data type consisting of a 3x2 half-precision floating-point matrix.

Source

pub const Half3x3: Self

Represents a data type consisting of a 3x3 half-precision floating-point matrix.

Source

pub const Half3x4: Self

Represents a data type consisting of a 3x4 half-precision floating-point matrix.

Source

pub const Half4x2: Self

Represents a data type consisting of a 4x2 half-precision floating-point matrix.

Source

pub const Half4x3: Self

Represents a data type consisting of a 4x3 half-precision floating-point matrix.

Source

pub const Half4x4: Self

Represents a data type consisting of a 4x4 half-precision floating-point matrix.

Source

pub const Int: Self

Represents a data type consisting of a single signed integer value.

Source

pub const Int2: Self

Represents a data type consisting of a vector of two signed integer values.

Source

pub const Int3: Self

Represents a data type consisting of a vector of three signed integer values.

Source

pub const Int4: Self

Represents a data type consisting of a vector of four signed integer values.

Source

pub const UInt: Self

Represents a data type consisting of a single unsigned integer value.

Source

pub const UInt2: Self

Represents a data type consisting of a vector of two unsigned integer values.

Source

pub const UInt3: Self

Represents a data type consisting of a vector of three unsigned integer values.

Source

pub const UInt4: Self

Represents a data type consisting of a vector of four unsigned integer values.

Source

pub const Short: Self

Represents a data type consisting of a single 16-bit signed integer value.

Source

pub const Short2: Self

Represents a data type consisting of a vector of two 16-bit signed integer values.

Source

pub const Short3: Self

Represents a data type consisting of a vector of three 16-bit signed integer values.

Source

pub const Short4: Self

Represents a data type consisting of a vector of three 16-bit signed integer values.

Source

pub const UShort: Self

Represents a data type consisting of a single 16-bit unsigned integer value.

Source

pub const UShort2: Self

Represents a data type consisting of a vector of two 16-bit unsigned integer values.

Source

pub const UShort3: Self

Represents a data type consisting of a vector of three 16-bit unsigned integer values.

Source

pub const UShort4: Self

Represents a data type consisting of a vector of four 16-bit unsigned integer values.

Source

pub const Char: Self

Represents a data type consisting of a single signed character value.

Source

pub const Char2: Self

Represents a data type consisting of a vector of two signed character values.

Source

pub const Char3: Self

Represents a data type consisting of a vector of three signed character values.

Source

pub const Char4: Self

Represents a data type consisting of a vector of four signed character values.

Source

pub const UChar: Self

Represents a data type consisting of a single unsigned character value.

Source

pub const UChar2: Self

Represents a data type consisting of a vector of two unsigned character values.

Source

pub const UChar3: Self

Represents a data type consisting of a vector of three unsigned character values.

Source

pub const UChar4: Self

Represents a data type consisting of a vector of four unsigned character values.

Source

pub const Bool: Self

Represents a data type consisting of a single boolean value.

Source

pub const Bool2: Self

Represents a data type consisting of a vector of two boolean values.

Source

pub const Bool3: Self

Represents a data type consisting of a vector of three boolean values.

Source

pub const Bool4: Self

Represents a data type consisting of a vector of four boolean values.

Source

pub const Texture: Self

Represents a data type corresponding to a texture object.

Source

pub const Sampler: Self

Represents a data type corresponding to a sampler state object.

Source

pub const Pointer: Self

Represents a data type corresponding to a pointer.

Source

pub const R8Unorm: Self

Represents an image block data type consisting of an unsigned 8-bit red channel normalized to the [0-1] range.

Source

pub const R8Snorm: Self

Represents an image block data type consisting of an signed 8-bit red channel normalized to the [0-1] range.

Source

pub const R16Unorm: Self

Represents an image block data type consisting of an unsigned 16-bit red channel normalized to the [0-1] range.

Source

pub const R16Snorm: Self

Represents an image block data type consisting of a signed 16-bit red channel normalized to the [0-1] range.

Source

pub const RG8Unorm: Self

Represents an image block data type consisting of an unsigned 8-bit red channel and a unsigned 8-bit green channel, both normalized to the [0-1] range.

Source

pub const RG8Snorm: Self

Represents an image block data type consisting of a signed 8-bit red channel and a signed 8-bit green channel, both normalized to the [0-1] range.

Source

pub const RG16Unorm: Self

Represents an image block data type consisting of an unsigned 16-bit red channel and an unsigned 16-bit green channel, both normalized to the [0-1] range.

Source

pub const RG16Snorm: Self

Represents an image block data type consisting of a signed 16-bit red channel and a signed 16-bit green channel, both normalized to the [0-1] range.

Source

pub const RGBA8Unorm: Self

Represents an image block data type consisting of four unsigned 8-bit channels normalized to the [0-1] range.

Source

pub const RGBA8Unorm_sRGB: Self

Represents an image block data type consisting of four unsigned 8-bit channels normalized to the [0-1] range and subject to gamma-correction.

Source

pub const RGBA8Snorm: Self

Represents an image block data type consisting of four signed 8-bit channels normalized to the [0-1] range.

Source

pub const RGBA16Unorm: Self

Represents an image block data type consisting of four unsigned 16-bit channels normalized to the [0-1] range.

Source

pub const RGBA16Snorm: Self

Represents an image block data type consisting of four signed 16-bit channels normalized to the [0-1] range.

Source

pub const RGB10A2Unorm: Self

Represents an image block data type consisting of three unsigned 10-bit channels and one 2-bit unsigned alpha channel, all normalized to the [0-1] range.

Source

pub const RG11B10Float: Self

Represents an image block data type consisting of two 11-bit floating-point channels, and one 10-bit floating-point blue channel.

Source

pub const RGB9E5Float: Self

Represents an image block data type consisting of three 9-bit floating-point channels, and one 5-bit floating-point exponent.

Source

pub const RenderPipeline: Self

Represents a data type corresponding to a render pipeline state object.

Source

pub const ComputePipeline: Self

Represents a data type corresponding to a compute pipeline state object.

Source

pub const IndirectCommandBuffer: Self

Represents a data type corresponding to an indirect command buffer object.

Source

pub const Long: Self

Represents a data type consisting of a signed long integer value.

Source

pub const Long2: Self

Represents a data type consisting of a vector of two signed long integer values.

Source

pub const Long3: Self

Represents a data type consisting of a vector of three signed long integer values.

Source

pub const Long4: Self

Represents a data type consisting of a vector of four signed long integer values.

Source

pub const ULong: Self

Represents a data type consisting of an unsigned long integer value.

Source

pub const ULong2: Self

Represents a data type consisting of a vector two unsigned long integer values.

Source

pub const ULong3: Self

Represents a data type consisting of a vector three unsigned long integer values.

Source

pub const ULong4: Self

Represents a data type consisting of a vector four unsigned long integer values.

Source

pub const VisibleFunctionTable: Self

Represents a data type corresponding to a visible function table object.

Source

pub const IntersectionFunctionTable: Self

Represents a data type corresponding to an intersection function table object.

Source

pub const PrimitiveAccelerationStructure: Self

Represents a data type corresponding to a primitive acceleration structure.

Source

pub const InstanceAccelerationStructure: Self

Represents a data type corresponding to an instance acceleration structure.

Source

pub const BFloat: Self

Represents a data type consisting of a single BFloat value.

Source

pub const BFloat2: Self

Represents a data type consisting of a vector two BFloat values.

Source

pub const BFloat3: Self

Represents a data type consisting of a vector three BFloat values.

Source

pub const BFloat4: Self

Represents a data type consisting of a vector four BFloat values.

Source

pub const DepthStencilState: Self

Represents a data type corresponding to a depth-stencil state object.

Source

pub const Tensor: Self

Represents a data type corresponding to a machine learning tensor.

Trait Implementations§

Source§

impl Clone for MTLDataType

Source§

fn clone(&self) -> MTLDataType

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MTLDataType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Encode for MTLDataType

Source§

const ENCODING: Encoding = NSUInteger::ENCODING

The Objective-C type-encoding for this type.
Source§

impl Hash for MTLDataType

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for MTLDataType

Source§

fn cmp(&self, other: &MTLDataType) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for MTLDataType

Source§

fn eq(&self, other: &MTLDataType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for MTLDataType

Source§

fn partial_cmp(&self, other: &MTLDataType) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl RefEncode for MTLDataType

Source§

const ENCODING_REF: Encoding

The Objective-C type-encoding for a reference of this type. Read more
Source§

impl Copy for MTLDataType

Source§

impl Eq for MTLDataType

Source§

impl StructuralPartialEq for MTLDataType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> EncodeArgument for T
where T: Encode,

Source§

const ENCODING_ARGUMENT: Encoding = T::ENCODING

The Objective-C type-encoding for this type.
Source§

impl<T> EncodeReturn for T
where T: Encode,

Source§

const ENCODING_RETURN: Encoding = T::ENCODING

The Objective-C type-encoding for this type.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> AutoreleaseSafe for T
where T: ?Sized,