Skip to main content

Attribute

Enum Attribute 

Source
pub enum Attribute {
Show 30 variants Align(Spanned<Expression>), Binding(Spanned<Expression>), BlendSrc(Spanned<Expression>), Builtin(BuiltinValue), Const, Diagnostic(DiagnosticAttribute), Group(Spanned<Expression>), Id(Spanned<Expression>), Interpolate(InterpolateAttribute), Invariant, Location(Spanned<Expression>), MustUse, Size(Spanned<Expression>), WorkgroupSize(WorkgroupSizeAttribute), Vertex, Fragment, Compute, If(Spanned<Expression>), Elif(Spanned<Expression>), Else, Task, Payload(Spanned<Expression>), Mesh(Spanned<Expression>), RayGeneration, AnyHit, ClosestHit, Miss, IncomingPayload(Spanned<Expression>), EarlyDepthTest(Option<ConservativeDepth>), Custom(CustomAttribute),
}

Variants§

§

Align(Spanned<Expression>)

§

Binding(Spanned<Expression>)

§

BlendSrc(Spanned<Expression>)

§

Builtin(BuiltinValue)

§

Const

§

Diagnostic(DiagnosticAttribute)

§

Group(Spanned<Expression>)

§

Id(Spanned<Expression>)

§

Interpolate(InterpolateAttribute)

§

Invariant

§

Location(Spanned<Expression>)

§

MustUse

§

Size(Spanned<Expression>)

§

WorkgroupSize(WorkgroupSizeAttribute)

§

Vertex

§

Fragment

§

Compute

§

If(Spanned<Expression>)

WESL extension

§

Elif(Spanned<Expression>)

WESL extension

§

Else

WESL extension

§

Task

Naga extension

§

Payload(Spanned<Expression>)

Naga extension

§

Mesh(Spanned<Expression>)

Naga extension

§

RayGeneration

Naga extension

§

AnyHit

Naga extension

§

ClosestHit

Naga extension

§

Miss

Naga extension

§

IncomingPayload(Spanned<Expression>)

Naga extension

§

EarlyDepthTest(Option<ConservativeDepth>)

Naga extension

§

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

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

Source

pub const fn is_any_hit(&self) -> bool

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

Source

pub const fn is_closest_hit(&self) -> bool

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

Source

pub const fn is_miss(&self) -> bool

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

Source

pub const fn is_incoming_payload(&self) -> bool

Returns true if this value is of type IncomingPayload. 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) -> Spanned<Expression>

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

Source

pub fn unwrap_binding(self) -> Spanned<Expression>

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

Source

pub fn unwrap_blend_src(self) -> Spanned<Expression>

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) -> Spanned<Expression>

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

Source

pub fn unwrap_id(self) -> Spanned<Expression>

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) -> Spanned<Expression>

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) -> Spanned<Expression>

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_if(self) -> Spanned<Expression>

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

Source

pub fn unwrap_elif(self) -> Spanned<Expression>

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_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) -> Spanned<Expression>

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

Source

pub fn unwrap_mesh(self) -> Spanned<Expression>

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

Source

pub fn unwrap_ray_generation(self)

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

Source

pub fn unwrap_any_hit(self)

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

Source

pub fn unwrap_closest_hit(self)

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

Source

pub fn unwrap_miss(self)

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

Source

pub fn unwrap_incoming_payload(self) -> Spanned<Expression>

Unwraps this value to the Attribute::IncomingPayload 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

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<(), Error>

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

impl Display for Attribute

Source§

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

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

impl From<BuiltinValue> for Attribute

Source§

fn from(value: BuiltinValue) -> Attribute

Converts to this type from the input type.
Source§

impl From<CustomAttribute> for Attribute

Source§

fn from(value: CustomAttribute) -> Attribute

Converts to this type from the input type.
Source§

impl From<DiagnosticAttribute> for Attribute

Source§

fn from(value: DiagnosticAttribute) -> Attribute

Converts to this type from the input type.
Source§

impl From<InterpolateAttribute> for Attribute

Source§

fn from(value: InterpolateAttribute) -> Attribute

Converts to this type from the input type.
Source§

impl From<WorkgroupSizeAttribute> for Attribute

Source§

fn from(value: WorkgroupSizeAttribute) -> Attribute

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 StructuralPartialEq for Attribute

Source§

impl Visit<TypeExpression> for Attribute

Source§

fn visit<'a>(&'a self) -> impl Iterator<Item = &'a TypeExpression>
where TypeExpression: 'a,

Visit each child node of type T in the subtree of Self. Read more
Source§

fn visit_mut<'a>(&'a mut self) -> impl Iterator<Item = &'a mut TypeExpression>
where TypeExpression: 'a,

Mutable version of Self::visit.
Source§

fn visit_rec<'a, F>(&'a self, f: &mut F)
where T: Visit<T> + 'a, F: FnMut(&T),

Visit each child node of type T in the subtree of Self, recursively in depth-first order. Read more
Source§

fn visit_rec_mut<'a, F>(&'a mut self, f: &mut F)
where T: Visit<T> + 'a, F: FnMut(&mut T),

Mutable version of Self::visit_rec.

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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.