pub struct NodeState<T> { /* private fields */ }
Expand description
A wrapper for some value T
, tracking some context around the value’s
computation state.
Implementations§
source§impl<T: HashValue> NodeState<T>
impl<T: HashValue> NodeState<T>
pub fn new(value: T) -> Self
pub fn node_hash(&self) -> NodeHash
pub fn node_hash_mut(&mut self) -> &mut NodeHash
sourcepub fn update_node_hash(&mut self, hasher: &mut impl Hasher)
pub fn update_node_hash(&mut self, hasher: &mut impl Hasher)
Update the stored hash value of the value.
pub fn value(&self) -> &T
pub fn value_mut(&mut self) -> &mut T
Trait Implementations§
Auto Trait Implementations§
impl<T> RefUnwindSafe for NodeState<T>where
T: RefUnwindSafe,
impl<T> Send for NodeState<T>where
T: Send,
impl<T> Sync for NodeState<T>where
T: Sync,
impl<T> Unpin for NodeState<T>where
T: Unpin,
impl<T> UnwindSafe for NodeState<T>where
T: UnwindSafe,
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