#[repr(align(8))]pub struct Struct { /* private fields */ }Expand description
The innards of a struct.
Note that both types and actual constructed structs use the same representation. The difference is that types do not contain associated fields (Mica does not have static fields.)
Implementations§
Source§impl Struct
impl Struct
Sourcepub fn new_type(dtable: GcRaw<DispatchTable>) -> Self
pub fn new_type(dtable: GcRaw<DispatchTable>) -> Self
Creates a new Struct representing a type.
Sourcepub unsafe fn dtable<'a>(&self) -> &'a DispatchTable
pub unsafe fn dtable<'a>(&self) -> &'a DispatchTable
Returns a reference to the dispatch table of the struct.
§Safety
Note that the reference’s lifetime does not match the struct’s. This is because the reference
actually comes from the GC, but Struct does not have a lifetime parameter that would
signify that.
Because the lifetime of the reference is not tracked, this function is unsafe.
Auto Trait Implementations§
impl !Freeze for Struct
impl !RefUnwindSafe for Struct
impl !Send for Struct
impl !Sync for Struct
impl Unpin for Struct
impl !UnwindSafe for Struct
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