pub enum Attr {
QPtr(QPtrAttr),
SpvAnnotation(Inst),
SpvDebugLine {
file_path: OrdAssertEq<InternedStr>,
line: u32,
col: u32,
},
SpvBitflagsOperand(Imm),
Diagnostics(OrdAssertEq<Vec<Diag>>),
}
Expand description
Any semantic or non-semantic (debuginfo) decoration/modifier, that can be optionally applied to some declaration/definition.
Always used via AttrSetDef
(interned as AttrSet
).
Variants§
QPtr(QPtrAttr)
QPtr
-specific attributes (see qptr::QPtrAttr
).
SpvAnnotation(Inst)
SpvDebugLine
SpvBitflagsOperand(Imm)
Some SPIR-V instructions, like OpFunction
, take a bitflags operand
that is effectively an optimization over using OpDecorate
.
Diagnostics(OrdAssertEq<Vec<Diag>>)
Can be used anywhere to record Diag
nostics produced during a pass,
while allowing the pass to continue (and its output to be pretty-printed).
Trait Implementations§
source§impl InnerTransform for Attr
impl InnerTransform for Attr
fn inner_transform_with( &self, transformer: &mut impl Transformer ) -> Transformed<Self>
source§impl InnerVisit for Attr
impl InnerVisit for Attr
fn inner_visit_with<'a>(&'a self, visitor: &mut impl Visitor<'a>)
source§impl Ord for Attr
impl Ord for Attr
source§impl PartialEq<Attr> for Attr
impl PartialEq<Attr> for Attr
source§impl PartialOrd<Attr> for Attr
impl PartialOrd<Attr> for Attr
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for Attr
impl StructuralEq for Attr
impl StructuralPartialEq for Attr
Auto Trait Implementations§
impl RefUnwindSafe for Attr
impl !Send for Attr
impl !Sync for Attr
impl Unpin for Attr
impl UnwindSafe for Attr
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
Mutably borrows from an owned value. Read more
source§impl<'a, T, V> DynInnerVisit<'a, V> for Twhere
T: InnerVisit,
V: Visitor<'a>,
impl<'a, T, V> DynInnerVisit<'a, V> for Twhere T: InnerVisit, V: Visitor<'a>,
fn dyn_inner_visit_with(&'a self, visitor: &mut V)
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.