[−][src]Struct memory_manager::object::ObjectDescriptor
Object descriptors.
Object Layout
┏━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━┯━━━━━━━━━━┓
┃ pointer to descriptor │ unpacked fields │ pointers ┃
┗━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━┷━━━━━━━━━━┛
All unpacked fields are gathered at the front of the object. Therefore, all the pointer fields are left at the back. This makes the object descriptor simple: 2 words determines the layout.
Fields
unpacked_field_count: usize
Number of unpacked fields in objects described by this descriptor.
pointer_count: usize
Number of boxed fields (i.e. pointers) in objects described by this descriptor.
Implementations
impl ObjectDescriptor
[src]
pub fn total_size(&self) -> usize
[src]
The total size occupied by this kind of object.
Always aligned to a Word
(i.e. usize
).
Size is calculated as follows:
- Descriptor Pointer: 1 word
- Unpacked Fields: 1 word/each
- Pointers: 1 word/each
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,