pub enum Attribute {
Show 24 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,
Publish,
If(ExpressionNode),
Elif(ExpressionNode),
Else,
Type(TypeConstraint),
EarlyDepthTest(Option<ConservativeDepth>),
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
Publish
imports only.If(ExpressionNode)
condcomp only.Elif(ExpressionNode)
condcomp only.Else
condcomp only.Type(TypeConstraint)
generics only.EarlyDepthTest(Option<ConservativeDepth>)
naga-ext only.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
Sourcepub const fn is_publish(&self) -> bool
pub const fn is_publish(&self) -> bool
Returns true if this value is of type Publish. Returns false otherwise
Sourcepub const fn is_if(&self) -> bool
pub const fn is_if(&self) -> bool
Returns true if this value is of type If. Returns false otherwise
Sourcepub const fn is_elif(&self) -> bool
pub const fn is_elif(&self) -> bool
Returns true if this value is of type Elif. Returns false otherwise
Sourcepub const fn is_else(&self) -> bool
pub const fn is_else(&self) -> bool
Returns true if this value is of type Else. Returns false otherwise
Sourcepub const fn is_type(&self) -> bool
pub const fn is_type(&self) -> bool
Returns true if this value is of type Type. Returns false otherwise
Sourcepub const fn is_early_depth_test(&self) -> bool
pub const fn is_early_depth_test(&self) -> bool
Returns true if this value is of type EarlyDepthTest. 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_publish(self)
pub fn unwrap_publish(self)
Unwraps this value to the Attribute::Publish variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_if(self) -> ExpressionNode
pub fn unwrap_if(self) -> ExpressionNode
Unwraps this value to the Attribute::If variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_elif(self) -> ExpressionNode
pub fn unwrap_elif(self) -> ExpressionNode
Unwraps this value to the Attribute::Elif variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_else(self)
pub fn unwrap_else(self)
Unwraps this value to the Attribute::Else variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_type(self) -> TypeConstraint
pub fn unwrap_type(self) -> TypeConstraint
Unwraps this value to the Attribute::Type variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_early_depth_test(self) -> Option<ConservativeDepth>
pub fn unwrap_early_depth_test(self) -> Option<ConservativeDepth>
Unwraps this value to the Attribute::EarlyDepthTest 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<'de> Deserialize<'de> for Attribute
impl<'de> Deserialize<'de> for Attribute
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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<TypeConstraint> for Attribute
impl From<TypeConstraint> for Attribute
Source§fn from(value: TypeConstraint) -> Self
fn from(value: TypeConstraint) -> 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