Enum Attribute

Source
pub enum Attribute {
Show 18 variants Align(ExpressionNode), Binding(ExpressionNode), BlendSrc(ExpressionNode), Builtin(BuiltinValue), Const, Diagnostic(DiagnosticAttribute), Group(ExpressionNode), Id(ExpressionNode), Interpolate(InterpolateAttribute), Invariant, Location(ExpressionNode), MustUse, Size(ExpressionNode), WorkgroupSize(WorkgroupSizeAttribute), Vertex, Fragment, Compute, Custom(CustomAttribute),
}

Variants§

§

Align(ExpressionNode)

§

Binding(ExpressionNode)

§

BlendSrc(ExpressionNode)

§

Builtin(BuiltinValue)

§

Const

§

Diagnostic(DiagnosticAttribute)

§

Group(ExpressionNode)

§

Id(ExpressionNode)

§

Interpolate(InterpolateAttribute)

§

Invariant

§

Location(ExpressionNode)

§

MustUse

§

Size(ExpressionNode)

§

WorkgroupSize(WorkgroupSizeAttribute)

§

Vertex

§

Fragment

§

Compute

§

Custom(CustomAttribute)

Implementations§

Source§

impl Attribute

Source

pub const fn is_align(&self) -> bool

Returns true if this value is of type Align. Returns false otherwise

Source

pub const fn is_binding(&self) -> bool

Returns true if this value is of type Binding. Returns false otherwise

Source

pub const fn is_blend_src(&self) -> bool

Returns true if this value is of type BlendSrc. Returns false otherwise

Source

pub const fn is_builtin(&self) -> bool

Returns true if this value is of type Builtin. Returns false otherwise

Source

pub const fn is_const(&self) -> bool

Returns true if this value is of type Const. Returns false otherwise

Source

pub const fn is_diagnostic(&self) -> bool

Returns true if this value is of type Diagnostic. Returns false otherwise

Source

pub const fn is_group(&self) -> bool

Returns true if this value is of type Group. Returns false otherwise

Source

pub const fn is_id(&self) -> bool

Returns true if this value is of type Id. Returns false otherwise

Source

pub const fn is_interpolate(&self) -> bool

Returns true if this value is of type Interpolate. Returns false otherwise

Source

pub const fn is_invariant(&self) -> bool

Returns true if this value is of type Invariant. Returns false otherwise

Source

pub const fn is_location(&self) -> bool

Returns true if this value is of type Location. Returns false otherwise

Source

pub const fn is_must_use(&self) -> bool

Returns true if this value is of type MustUse. Returns false otherwise

Source

pub const fn is_size(&self) -> bool

Returns true if this value is of type Size. Returns false otherwise

Source

pub const fn is_workgroup_size(&self) -> bool

Returns true if this value is of type WorkgroupSize. Returns false otherwise

Source

pub const fn is_vertex(&self) -> bool

Returns true if this value is of type Vertex. Returns false otherwise

Source

pub const fn is_fragment(&self) -> bool

Returns true if this value is of type Fragment. Returns false otherwise

Source

pub const fn is_compute(&self) -> bool

Returns true if this value is of type Compute. Returns false otherwise

Source

pub const fn is_custom(&self) -> bool

Returns true if this value is of type Custom. Returns false otherwise

Source§

impl Attribute

Source

pub fn unwrap_align(self) -> ExpressionNode

Unwraps this value to the Attribute::Align variant. Panics if this value is of any other type.

Source

pub fn unwrap_binding(self) -> ExpressionNode

Unwraps this value to the Attribute::Binding variant. Panics if this value is of any other type.

Source

pub fn unwrap_blend_src(self) -> ExpressionNode

Unwraps this value to the Attribute::BlendSrc variant. Panics if this value is of any other type.

Source

pub fn unwrap_builtin(self) -> BuiltinValue

Unwraps this value to the Attribute::Builtin variant. Panics if this value is of any other type.

Source

pub fn unwrap_const(self)

Unwraps this value to the Attribute::Const variant. Panics if this value is of any other type.

Source

pub fn unwrap_diagnostic(self) -> DiagnosticAttribute

Unwraps this value to the Attribute::Diagnostic variant. Panics if this value is of any other type.

Source

pub fn unwrap_group(self) -> ExpressionNode

Unwraps this value to the Attribute::Group variant. Panics if this value is of any other type.

Source

pub fn unwrap_id(self) -> ExpressionNode

Unwraps this value to the Attribute::Id variant. Panics if this value is of any other type.

Source

pub fn unwrap_interpolate(self) -> InterpolateAttribute

Unwraps this value to the Attribute::Interpolate variant. Panics if this value is of any other type.

Source

pub fn unwrap_invariant(self)

Unwraps this value to the Attribute::Invariant variant. Panics if this value is of any other type.

Source

pub fn unwrap_location(self) -> ExpressionNode

Unwraps this value to the Attribute::Location variant. Panics if this value is of any other type.

Source

pub fn unwrap_must_use(self)

Unwraps this value to the Attribute::MustUse variant. Panics if this value is of any other type.

Source

pub fn unwrap_size(self) -> ExpressionNode

Unwraps this value to the Attribute::Size variant. Panics if this value is of any other type.

Source

pub fn unwrap_workgroup_size(self) -> WorkgroupSizeAttribute

Unwraps this value to the Attribute::WorkgroupSize variant. Panics if this value is of any other type.

Source

pub fn unwrap_vertex(self)

Unwraps this value to the Attribute::Vertex variant. Panics if this value is of any other type.

Source

pub fn unwrap_fragment(self)

Unwraps this value to the Attribute::Fragment variant. Panics if this value is of any other type.

Source

pub fn unwrap_compute(self)

Unwraps this value to the Attribute::Compute variant. Panics if this value is of any other type.

Source

pub fn unwrap_custom(self) -> CustomAttribute

Unwraps this value to the Attribute::Custom variant. Panics if this value is of any other type.

Trait Implementations§

Source§

impl Clone for Attribute

Source§

fn clone(&self) -> Attribute

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 Attribute

Source§

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

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

impl Display for Attribute

Source§

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

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

impl From<BuiltinValue> for Attribute

Source§

fn from(value: BuiltinValue) -> Self

Converts to this type from the input type.
Source§

impl From<CustomAttribute> for Attribute

Source§

fn from(value: CustomAttribute) -> Self

Converts to this type from the input type.
Source§

impl From<DiagnosticAttribute> for Attribute

Source§

fn from(value: DiagnosticAttribute) -> Self

Converts to this type from the input type.
Source§

impl From<InterpolateAttribute> for Attribute

Source§

fn from(value: InterpolateAttribute) -> Self

Converts to this type from the input type.
Source§

impl From<WorkgroupSizeAttribute> for Attribute

Source§

fn from(value: WorkgroupSizeAttribute) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for Attribute

Source§

fn eq(&self, other: &Attribute) -> 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 StructuralPartialEq for Attribute

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> 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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.