MCPcopy Create free account
hub / github.com/BillyDM/Firewheel / node_state

Method node_state

crates/firewheel-graph/src/graph.rs:314–316  ·  view source on GitHub ↗

Get an immutable reference to the custom state of a node.

(&self, id: NodeID)

Source from the content-addressed store, hash-verified

312
313 /// Get an immutable reference to the custom state of a node.
314 pub fn node_state<T: 'static>(&self, id: NodeID) -> Option<&T> {
315 self.node_state_dyn(id).and_then(|s| s.downcast_ref())
316 }
317
318 /// Get a type-erased, immutable reference to the custom state of a node.
319 pub fn node_state_dyn(&self, id: NodeID) -> Option<&dyn Any> {

Callers

nothing calls this directly

Calls 2

downcast_refMethod · 0.80
node_state_dynMethod · 0.45

Tested by

no test coverage detected