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
impl Attribute
Sourcepub const fn is_align(&self) -> bool
pub const fn is_align(&self) -> bool
Returns true
if this value is of type Align
. Returns false
otherwise
Sourcepub const fn is_binding(&self) -> bool
pub const fn is_binding(&self) -> bool
Returns true
if this value is of type Binding
. Returns false
otherwise
Sourcepub const fn is_blend_src(&self) -> bool
pub const fn is_blend_src(&self) -> bool
Returns true
if this value is of type BlendSrc
. Returns false
otherwise
Sourcepub const fn is_builtin(&self) -> bool
pub const fn is_builtin(&self) -> bool
Returns true
if this value is of type Builtin
. Returns false
otherwise
Sourcepub const fn is_const(&self) -> bool
pub const fn is_const(&self) -> bool
Returns true
if this value is of type Const
. Returns false
otherwise
Sourcepub const fn is_diagnostic(&self) -> bool
pub const fn is_diagnostic(&self) -> bool
Returns true
if this value is of type Diagnostic
. Returns false
otherwise
Sourcepub const fn is_group(&self) -> bool
pub const fn is_group(&self) -> bool
Returns true
if this value is of type Group
. Returns false
otherwise
Sourcepub const fn is_id(&self) -> bool
pub const fn is_id(&self) -> bool
Returns true
if this value is of type Id
. Returns false
otherwise
Sourcepub const fn is_interpolate(&self) -> bool
pub const fn is_interpolate(&self) -> bool
Returns true
if this value is of type Interpolate
. Returns false
otherwise
Sourcepub const fn is_invariant(&self) -> bool
pub const fn is_invariant(&self) -> bool
Returns true
if this value is of type Invariant
. Returns false
otherwise
Sourcepub const fn is_location(&self) -> bool
pub const fn is_location(&self) -> bool
Returns true
if this value is of type Location
. Returns false
otherwise
Sourcepub const fn is_must_use(&self) -> bool
pub const fn is_must_use(&self) -> bool
Returns true
if this value is of type MustUse
. Returns false
otherwise
Sourcepub const fn is_size(&self) -> bool
pub const fn is_size(&self) -> bool
Returns true
if this value is of type Size
. Returns false
otherwise
Sourcepub const fn is_workgroup_size(&self) -> bool
pub const fn is_workgroup_size(&self) -> bool
Returns true
if this value is of type WorkgroupSize
. Returns false
otherwise
Sourcepub const fn is_vertex(&self) -> bool
pub const fn is_vertex(&self) -> bool
Returns true
if this value is of type Vertex
. Returns false
otherwise
Sourcepub const fn is_fragment(&self) -> bool
pub const fn is_fragment(&self) -> bool
Returns true
if this value is of type Fragment
. Returns false
otherwise
Sourcepub const fn is_compute(&self) -> bool
pub const fn is_compute(&self) -> bool
Returns true
if this value is of type Compute
. Returns false
otherwise
Source§impl Attribute
impl Attribute
Sourcepub fn unwrap_align(self) -> ExpressionNode
pub fn unwrap_align(self) -> ExpressionNode
Unwraps this value to the Attribute::Align
variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_binding(self) -> ExpressionNode
pub fn unwrap_binding(self) -> ExpressionNode
Unwraps this value to the Attribute::Binding
variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_blend_src(self) -> ExpressionNode
pub fn unwrap_blend_src(self) -> ExpressionNode
Unwraps this value to the Attribute::BlendSrc
variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_builtin(self) -> BuiltinValue
pub fn unwrap_builtin(self) -> BuiltinValue
Unwraps this value to the Attribute::Builtin
variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_const(self)
pub fn unwrap_const(self)
Unwraps this value to the Attribute::Const
variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_diagnostic(self) -> DiagnosticAttribute
pub fn unwrap_diagnostic(self) -> DiagnosticAttribute
Unwraps this value to the Attribute::Diagnostic
variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_group(self) -> ExpressionNode
pub fn unwrap_group(self) -> ExpressionNode
Unwraps this value to the Attribute::Group
variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_id(self) -> ExpressionNode
pub fn unwrap_id(self) -> ExpressionNode
Unwraps this value to the Attribute::Id
variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_interpolate(self) -> InterpolateAttribute
pub fn unwrap_interpolate(self) -> InterpolateAttribute
Unwraps this value to the Attribute::Interpolate
variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_invariant(self)
pub fn unwrap_invariant(self)
Unwraps this value to the Attribute::Invariant
variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_location(self) -> ExpressionNode
pub fn unwrap_location(self) -> ExpressionNode
Unwraps this value to the Attribute::Location
variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_must_use(self)
pub fn unwrap_must_use(self)
Unwraps this value to the Attribute::MustUse
variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_size(self) -> ExpressionNode
pub fn unwrap_size(self) -> ExpressionNode
Unwraps this value to the Attribute::Size
variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_workgroup_size(self) -> WorkgroupSizeAttribute
pub fn unwrap_workgroup_size(self) -> WorkgroupSizeAttribute
Unwraps this value to the Attribute::WorkgroupSize
variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_vertex(self)
pub fn unwrap_vertex(self)
Unwraps this value to the Attribute::Vertex
variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_fragment(self)
pub fn unwrap_fragment(self)
Unwraps this value to the Attribute::Fragment
variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_compute(self)
pub fn unwrap_compute(self)
Unwraps this value to the Attribute::Compute
variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_custom(self) -> CustomAttribute
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 From<BuiltinValue> for Attribute
impl From<BuiltinValue> for Attribute
Source§fn from(value: BuiltinValue) -> Self
fn from(value: BuiltinValue) -> Self
Source§impl From<CustomAttribute> for Attribute
impl From<CustomAttribute> for Attribute
Source§fn from(value: CustomAttribute) -> Self
fn from(value: CustomAttribute) -> Self
Source§impl From<DiagnosticAttribute> for Attribute
impl From<DiagnosticAttribute> for Attribute
Source§fn from(value: DiagnosticAttribute) -> Self
fn from(value: DiagnosticAttribute) -> Self
Source§impl From<InterpolateAttribute> for Attribute
impl From<InterpolateAttribute> for Attribute
Source§fn from(value: InterpolateAttribute) -> Self
fn from(value: InterpolateAttribute) -> Self
Source§impl From<WorkgroupSizeAttribute> for Attribute
impl From<WorkgroupSizeAttribute> for Attribute
Source§fn from(value: WorkgroupSizeAttribute) -> Self
fn from(value: WorkgroupSizeAttribute) -> Self
impl StructuralPartialEq for Attribute
Auto Trait Implementations§
impl Freeze for Attribute
impl RefUnwindSafe for Attribute
impl Send for Attribute
impl Sync for Attribute
impl Unpin for Attribute
impl UnwindSafe for Attribute
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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