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§
Sourcefn string(&self) -> Option<&'a str>
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.
Sourcefn integer(&self) -> Option<i64>
fn integer(&self) -> Option<i64>
Gets the integer value of this node. This will be None
if the node is not an integer
node.
Sourcefn float(&self) -> Option<f64>
fn float(&self) -> Option<f64>
Gets the float value of this node. This will be None
if the node is not a float node.
Sourcefn vector(&self) -> Option<(i32, i32)>
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.