pub struct Handle(/* private fields */);Expand description
A value word. Equal handles are equal values; for two persistent handles the converse holds too, because the store is hash-consed.
Implementations§
Source§impl Handle
impl Handle
Sourcepub const fn as_model_id(self) -> Option<u32>
pub const fn as_model_id(self) -> Option<u32>
The name’s string id, if this is a model value.
Sourcepub const fn is_compound(self) -> bool
pub const fn is_compound(self) -> bool
Whether this is a compound (persistent or transient).
Sourcepub const fn is_transient(self) -> bool
pub const fn is_transient(self) -> bool
Whether this is a transient compound.
Sourcepub const fn is_persistent(self) -> bool
pub const fn is_persistent(self) -> bool
Whether this is a persistent compound.
Sourcepub const fn is_lazy_persistent(self) -> bool
pub const fn is_lazy_persistent(self) -> bool
Whether this is a persistent lazy node (a lazy constant), which is
not hash-consed by value: such handles must not be compared.
Lazy values and view-flagged nodes (crate::node::flags::VIEW)
share this class: both are interned structurally, apart from
identities.
Trait Implementations§
impl Copy for Handle
impl Eq for Handle
Source§impl Ord for Handle
impl Ord for Handle
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Handle
impl PartialOrd for Handle
impl StructuralPartialEq for Handle
Auto Trait Implementations§
impl Forget for Handle
impl Freeze for Handle
impl Move for Handle
impl RefUnwindSafe for Handle
impl Send for Handle
impl Sync for Handle
impl Unpin for Handle
impl UnsafeUnpin for Handle
impl UnwindSafe for Handle
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