PyTree

Trait PyTree 

Source
pub trait PyTree: Tree + Any {
    // Required method
    fn to_object(&self, py: Python<'_>) -> PyObject;
}
Expand description

Trait for Python tree objects that can be converted to and from Python objects.

This trait is implemented by all tree types that wrap Python objects.

Required Methods§

Source

fn to_object(&self, py: Python<'_>) -> PyObject

Get the underlying Python object for this tree.

Implementations§

Source§

impl dyn PyTree

Source

pub fn as_tree(&self) -> &dyn Tree

Get a reference to self as a Tree trait object.

Implementors§