Struct cranelift_isle::sema::Variant
source · pub struct Variant {
pub name: Sym,
pub fullname: Sym,
pub id: VariantId,
pub fields: Vec<Field>,
}
Expand description
A variant of an enum.
Fields§
§name: Sym
The name of this variant.
fullname: Sym
The full, prefixed-with-the-enum’s-name name of this variant.
E.g. if the enum is Foo
and this variant is Bar
, then the
fullname
is Foo.Bar
.
id: VariantId
The id of this variant, i.e. the index of this variant within its
enum’s Type::Enum::variants
.
fields: Vec<Field>
The data fields of this enum variant.
Trait Implementations§
impl Eq for Variant
impl StructuralPartialEq for Variant
Auto Trait Implementations§
impl Freeze for Variant
impl RefUnwindSafe for Variant
impl Send for Variant
impl Sync for Variant
impl Unpin for Variant
impl UnwindSafe for Variant
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)