pub struct LayoutComputer { /* private fields */ }Expand description
Computes memory layouts for types.
Implementations§
Source§impl LayoutComputer
impl LayoutComputer
Sourcepub fn register_type(&mut self, info: TypeInfo)
pub fn register_type(&mut self, info: TypeInfo)
Register type information.
Sourcepub fn compute_ctor_layout(
&mut self,
ctor_name: &str,
ctor_tag: u32,
field_types: &[LcnfType],
) -> ObjectLayout
pub fn compute_ctor_layout( &mut self, ctor_name: &str, ctor_tag: u32, field_types: &[LcnfType], ) -> ObjectLayout
Compute the layout for a constructor application.
Sourcepub fn compute_layout(&mut self, type_name: &str) -> Vec<(String, ObjectLayout)>
pub fn compute_layout(&mut self, type_name: &str) -> Vec<(String, ObjectLayout)>
Compute the layout for a type given its info.
Sourcepub fn get_cached(&self, key: &str) -> Option<&ObjectLayout>
pub fn get_cached(&self, key: &str) -> Option<&ObjectLayout>
Get a cached layout.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LayoutComputer
impl RefUnwindSafe for LayoutComputer
impl Send for LayoutComputer
impl Sync for LayoutComputer
impl Unpin for LayoutComputer
impl UnsafeUnpin for LayoutComputer
impl UnwindSafe for LayoutComputer
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