Skip to main content

Attribute

Enum Attribute 

Source
pub enum Attribute {
Show 27 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, Task, Payload(ExpressionNode), Mesh(ExpressionNode), 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

§

Task

Available on crate feature naga-ext only.
§

Payload(ExpressionNode)

Available on crate feature naga-ext only.
§

Mesh(ExpressionNode)

Available on crate feature naga-ext only.
§

Publish

Available on crate feature imports only.
§

If(ExpressionNode)

Available on crate feature condcomp only.
§

Elif(ExpressionNode)

Available on crate feature condcomp only.
§

Else

Available on crate feature condcomp only.
§

Type(TypeConstraint)

Available on crate feature generics only.
§

EarlyDepthTest(Option<ConservativeDepth>)

Available on crate feature naga-ext only.
§

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_task(&self) -> bool

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

Source

pub const fn is_payload(&self) -> bool

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

Source

pub const fn is_mesh(&self) -> bool

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

Source

pub const fn is_publish(&self) -> bool

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

Source

pub const fn is_if(&self) -> bool

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

Source

pub const fn is_elif(&self) -> bool

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

Source

pub const fn is_else(&self) -> bool

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

Source

pub const fn is_type(&self) -> bool

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

Source

pub const fn is_early_depth_test(&self) -> bool

Returns true if this value is of type EarlyDepthTest. 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_task(self)

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

Source

pub fn unwrap_payload(self) -> ExpressionNode

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

Source

pub fn unwrap_mesh(self) -> ExpressionNode

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

Source

pub fn unwrap_publish(self)

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

Source

pub fn unwrap_if(self) -> ExpressionNode

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

Source

pub fn unwrap_elif(self) -> ExpressionNode

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

Source

pub fn unwrap_else(self)

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

Source

pub fn unwrap_type(self) -> TypeConstraint

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

Source

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.

Source

pub fn unwrap_custom(self) -> CustomAttribute

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

Source§

impl Attribute

Source

pub fn is_entry_point(&self) -> bool

Source

pub fn is_condcomp(&self) -> bool

Available on crate feature condcomp only.

Trait Implementations§

Source§

impl Clone for Attribute

Source§

fn clone(&self) -> Attribute

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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<'de> Deserialize<'de> for Attribute

Available on crate feature serde only.
Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. 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<TypeConstraint> for Attribute

Source§

fn from(value: TypeConstraint) -> 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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl Serialize for Attribute

Available on crate feature serde only.
Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Attribute

Source§

impl TokRepr for Attribute

Available on crate feature tokrepr only.

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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.