pub struct MirStructDef {
pub name: String,
pub fields: Vec<(String, String)>,
pub is_record: bool,
pub vis: Visibility,
}Expand description
A struct (or record/class) type definition at the MIR level.
Struct definitions carry through from HIR without modification.
The is_record flag distinguishes immutable
value-type records from mutable class-style structs.
Fields§
§name: StringName of the struct type.
fields: Vec<(String, String)>Fields as (field_name, type_name) pairs, in declaration order.
is_record: boolTrue if this is a record (immutable value type).
vis: VisibilityVisibility of this struct definition.
Trait Implementations§
Source§impl Clone for MirStructDef
impl Clone for MirStructDef
Source§fn clone(&self) -> MirStructDef
fn clone(&self) -> MirStructDef
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for MirStructDef
impl RefUnwindSafe for MirStructDef
impl Send for MirStructDef
impl Sync for MirStructDef
impl Unpin for MirStructDef
impl UnsafeUnpin for MirStructDef
impl UnwindSafe for MirStructDef
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