[−][src]Module zamm_yin::graph::value_wrappers
Wrappers around values associated with nodes in the KB. This differs from the other
wrappers
package because this abstraction only wraps the
values associated with nodes, while the other one wraps the nodes themselves.
Due to Rust restrictions around upcasting to Any, it appears necessary to create an extra wrapper.
Structs
StrongValue | KBValue for owned data. |
WeakValue | KBValue for weak references to data. |
Traits
KBValue | Wrapper for KB values, because Rust doesn't support upcasting at the moment, and the KB should support referring to external data structures that it doesn't own itself. |
Functions
unwrap_closure | Returns the value held by a closure StrongValue. We need a RefCell here because somehow closures are mutable when called, and the Rc that wraps a KBValue prevents mutability. |
unwrap_strong | Similar to unwrap_weak, returns the value held by a String-valued StrongValue. |
unwrap_weak | Helper function for unwrapping values contained inside a WeakValue. |
Type Definitions
KBClosure | Closure stored inside the KB. |