pub struct Shape {
pub elem_words: usize,
pub assoc: bool,
pub key: KeyKind,
pub obj: bool,
pub nested: Nested,
}Expand description
What an operation works on: element size, and for an associative array, its key type.
Fields§
§elem_words: usize§assoc: bool§key: KeyKind§obj: boolThe elements are class handles (word 0 of each): the collection owns
a reference on each object (see [Held]).
nested: NestedClass handles inside each element that is not itself a handle (a
struct or fixed array of handles): the collection owns a reference on
each, exactly as for obj (Nested).
Implementations§
Source§impl Shape
impl Shape
Sourcepub fn discard(&self, val: &[u64])
pub fn discard(&self, val: &[u64])
Gives up the reference an operation that did not store val was
handed on its element (the operation was a no-op: an out-of-range
write, an invalid key).
Sourcepub fn key_from_bits(&self, bits: &[u64]) -> Option<Key>
pub fn key_from_bits(&self, bits: &[u64]) -> Option<Key>
The words of a packed key value ((unk << width) | val): None if
any bit is unknown (such a key is invalid, §7.8.6).
Sourcepub fn key_to_bits(&self, key: &Key, out: &mut [u64])
pub fn key_to_bits(&self, key: &Key, out: &mut [u64])
key as packed bits into out (a string key as its interned id).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Shape
impl RefUnwindSafe for Shape
impl Send for Shape
impl Sync for Shape
impl Unpin for Shape
impl UnsafeUnpin for Shape
impl UnwindSafe for Shape
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