Enum cranelift_isle::sema::Type
source · [−]pub enum Type {
Primitive(TypeId, Sym, Pos),
Enum {
name: Sym,
id: TypeId,
is_extern: bool,
variants: Vec<Variant>,
pos: Pos,
},
}
Expand description
A type.
Variants
Primitive(TypeId, Sym, Pos)
A primitive, Copy
type.
These are always defined externally, and we allow literals of these types to pass through from ISLE source code to the emitted Rust code.
Enum
Fields
name: Sym
The name of this enum.
id: TypeId
This enum
’s type id.
is_extern: bool
Is this enum
defined in external Rust code?
If so, ISLE will not emit a definition for it. If not, then it will emit a Rust definition for it.
pos: Pos
The ISLE source position where this enum
is defined.
A sum type.
Note that enums with only one variant are equivalent to a “struct”.
Implementations
Trait Implementations
impl Eq for Type
impl StructuralEq for Type
impl StructuralPartialEq for Type
Auto Trait Implementations
impl RefUnwindSafe for Type
impl Send for Type
impl Sync for Type
impl Unpin for Type
impl UnwindSafe for Type
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more