pub struct NodeFlags { /* private fields */ }Expand description
Flags that describe algebraic properties of a node.
Implementations§
Source§impl NodeFlags
impl NodeFlags
Sourcepub const fn commutative() -> Self
pub const fn commutative() -> Self
Creates flags with commutativity set.
Sourcepub const fn commutative_associative() -> Self
pub const fn commutative_associative() -> Self
Creates flags with both commutativity and associativity set.
Sourcepub const fn is_commutative(self) -> bool
pub const fn is_commutative(self) -> bool
Returns true if the commutative flag is set.
Sourcepub const fn is_associative(self) -> bool
pub const fn is_associative(self) -> bool
Returns true if the associative flag is set.
Sourcepub const fn is_canonical(self) -> bool
pub const fn is_canonical(self) -> bool
Returns true if the canonical flag is set.
Sourcepub const fn with_canonical(self) -> Self
pub const fn with_canonical(self) -> Self
Sets the canonical flag.
Sourcepub const fn without_canonical(self) -> Self
pub const fn without_canonical(self) -> Self
Returns the flags with the canonical bit cleared.
Used by the deduplication map to compare structural identity without regard to whether a node has been marked canonical at runtime.
Sourcepub const fn bits(self) -> u8
pub const fn bits(self) -> u8
Returns the raw bit pattern — used when packing to the wire
representation in crate::dag::packed.
Trait Implementations§
Source§impl<'__de, __Context> BorrowDecode<'__de, __Context> for NodeFlags
impl<'__de, __Context> BorrowDecode<'__de, __Context> for NodeFlags
Source§fn borrow_decode<__D: BorrowDecoder<'__de, Context = __Context>>(
decoder: &mut __D,
) -> Result<Self, DecodeError>
fn borrow_decode<__D: BorrowDecoder<'__de, Context = __Context>>( decoder: &mut __D, ) -> Result<Self, DecodeError>
Attempt to decode this type with the given [
BorrowDecode]. Read moreimpl Copy for NodeFlags
impl Eq for NodeFlags
impl StructuralPartialEq for NodeFlags
Auto Trait Implementations§
impl Freeze for NodeFlags
impl RefUnwindSafe for NodeFlags
impl Send for NodeFlags
impl Sync for NodeFlags
impl Unpin for NodeFlags
impl UnsafeUnpin for NodeFlags
impl UnwindSafe for NodeFlags
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.