Get an immutable reference to the custom state of a node.
(&self, id: NodeID)
| 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> { |
nothing calls this directly
no test coverage detected