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 PartialOrd for Attr
impl PartialOrd for Attr
impl Eq for Attr
impl StructuralPartialEq for Attr
Auto Trait Implementations§
impl Freeze for Attr
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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 Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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<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>
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 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>
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