Trait nx::GenericNode [-]  [+] [src]

pub trait GenericNode<'a> {
    fn get(&self, name: &str) -> Option<Node<'a>>;
    fn dtype(&self) -> Type;
    fn string(&self) -> Option<&'a str>;
    fn integer(&self) -> Option<i64>;
    fn float(&self) -> Option<f64>;
    fn vector(&self) -> Option<(i32, i32)>;
}

The basic functionality for all nodes.

Required Methods

fn get(&self, name: &str) -> Option<Node<'a>>

Gets the child node of the specified name.

fn dtype(&self) -> Type

Gets the type of this node.

fn string(&self) -> Option<&'a str>

Gets the string value of this node. This will be None if the node is not a string node.

fn integer(&self) -> Option<i64>

Gets the integer value of this node. This will be None if the node is not an integer node.

fn float(&self) -> Option<f64>

Gets the float value of this node. This will be None if the node is not a float node.

fn vector(&self) -> Option<(i32, i32)>

Gets the vector value of this node. This will be None if the node is not a vector node.

Implementors