[][src]Trait zamm_yin::graph::value_wrappers::KBValue

pub trait KBValue: Any {
    pub fn as_any(&self) -> &dyn Any;
}

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.

This is an implementation of https://stackoverflow.com/a/42057047/257583.

Required methods

pub fn as_any(&self) -> &dyn Any[src]

Because Rust doesn't support upcasting at the moment, this allows us to manually upcast to Any and then downcast to the desired struct thereafter.

Loading content...

Implementors

impl<'a, T: Any + 'static> KBValue for StrongValue<T>[src]

impl<'a, T: Any + 'static> KBValue for WeakValue<T>[src]

Loading content...