Skip to main content

Shape

Struct Shape 

Source
pub struct Shape {
    pub parent: Option<ShapeId>,
    pub key: PropertyKey,
    pub flags: PropertyFlags,
    pub slot: u32,
    pub count: u32,
    pub width: u32,
    pub prototype: Option<ObjectId>,
    pub kind: ObjectKind,
    pub transitions: Transitions,
    pub table: OnceCell<Box<HashMap<PropertyKey, (u32, PropertyFlags), BuildHasherDefault<FxHasher>>>>,
    pub validity: ValidityCellId,
    pub dictionary: Option<Box<Dictionary>>,
}

Fields§

§parent: Option<ShapeId>

Transition-tree parent; None for roots and dictionary shapes.

§key: PropertyKey

The property this node adds (meaningless when count == 0).

§flags: PropertyFlags§slot: u32§count: u32

Properties up to and including this node.

§width: u32

Slots used up to and including this node: count plus one per accessor, whose getter and setter take two.

§prototype: Option<ObjectId>§kind: ObjectKind§transitions: Transitions§table: OnceCell<Box<HashMap<PropertyKey, (u32, PropertyFlags), BuildHasherDefault<FxHasher>>>>

Key → (slot, flags), built on the first lookup past TABLE_THRESHOLD properties.

§validity: ValidityCellId

The prototype’s validity cell as last seen, or NONE.

§dictionary: Option<Box<Dictionary>>

Implementations§

Source§

impl Shape

Source

pub fn is_dictionary(&self) -> bool

Source

pub fn has_table(&self) -> bool

Whether the lookup table has been built.

Trait Implementations§

Source§

impl Record for Shape

Source§

fn vacant() -> Self

The poison value written over a freed slot. It must own no heap memory.
Source§

fn extra_bytes(&self) -> usize

Bytes owned outside the arena slot (string contents, tables), counted toward the heap cap.

Auto Trait Implementations§

§

impl !Freeze for Shape

§

impl !RefUnwindSafe for Shape

§

impl !Sync for Shape

§

impl Send for Shape

§

impl Unpin for Shape

§

impl UnsafeUnpin for Shape

§

impl UnwindSafe for Shape

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.