#[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
sourceimpl 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.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Struct
impl !Send for Struct
impl !Sync for Struct
impl Unpin for Struct
impl !UnwindSafe for Struct
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more