Trait GenericNode

Source
pub trait GenericNode<'a> {
    // Required methods
    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)>;
    fn audio(&self) -> Option<Audio<'a>>;
    fn bitmap(&self) -> Option<Bitmap<'a>>;
}
Expand description

The basic functionality for all nodes.

Required Methods§

Source

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

Gets the child node of the specified name.

Source

fn dtype(&self) -> Type

Gets the type of this node.

Source

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.

Source

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

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

Source

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

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

Source

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.

Source

fn audio(&self) -> Option<Audio<'a>>

Gets the audio value of thise node. This will be None if the node is not an audio node.

Source

fn bitmap(&self) -> Option<Bitmap<'a>>

Gets the bitmap value of thise node. This will be None if the node is not a bitmap node.

Implementations on Foreign Types§

Source§

impl<'a> GenericNode<'a> for Option<Node<'a>>

Source§

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

Source§

fn dtype(&self) -> Type

Source§

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

Source§

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

Source§

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

Source§

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

Source§

fn audio(&self) -> Option<Audio<'a>>

Source§

fn bitmap(&self) -> Option<Bitmap<'a>>

Implementors§

Source§

impl<'a> GenericNode<'a> for Node<'a>