[][src]Trait zamm_yin::node_wrappers::BaseNodeTrait

pub trait BaseNodeTrait<T>: CommonNodeTrait {
    fn set_value(&mut self, value: Box<dyn KBValue>);
fn value(&self) -> Option<Rc<Box<dyn KBValue>>>;
fn add_outgoing(&mut self, edge_type: usize, to: &T);
fn add_incoming(&mut self, edge_type: usize, from: &T);
fn has_outgoing(&self, edge_type: usize, to: &T) -> bool;
fn has_incoming(&self, edge_type: usize, from: &T) -> bool;
fn outgoing_nodes(&self, edge_type: usize) -> Vec<T>;
fn incoming_nodes(&self, edge_type: usize) -> Vec<T>; }

All low-level wrappers will have these functions available.

Required methods

fn set_value(&mut self, value: Box<dyn KBValue>)

Associate this node with a value.

fn value(&self) -> Option<Rc<Box<dyn KBValue>>>

Retrieve the value associated with this node.

fn add_outgoing(&mut self, edge_type: usize, to: &T)

Link this node to another one via an outgoing edge.

fn add_incoming(&mut self, edge_type: usize, from: &T)

Link this node to another one via an incoming edge.

fn has_outgoing(&self, edge_type: usize, to: &T) -> bool

Whether or not this node is linked to another one via an outgoing edge of a certain type.

fn has_incoming(&self, edge_type: usize, from: &T) -> bool

Whether or not this node is linked to another one via an outgoing edge of a certain type.

fn outgoing_nodes(&self, edge_type: usize) -> Vec<T>

All nodes that this one links to via outgoing edges of a certain type.

fn incoming_nodes(&self, edge_type: usize) -> Vec<T>

All nodes that this one links to via incoming edges of a certain type.

Loading content...

Implementors

impl BaseNodeTrait<BaseNode> for BaseNode[src]

impl BaseNodeTrait<FinalNode> for FinalNode[src]

impl BaseNodeTrait<InheritanceNode> for InheritanceNode[src]

Loading content...