pub trait Transform: Send + Sync {
// Required methods
fn input(&self) -> TreeKind;
fn output(&self) -> TreeKind;
fn run<'a>(
&self,
tree: Tree<'a>,
file: &mut File,
alloc: &'a Allocator,
) -> Result<Tree<'a>, Error>;
// Provided methods
fn start<'a>(
&self,
tree: Tree<'a>,
file: &mut File,
alloc: &'a Allocator,
) -> Result<Step<'a>, Error> { ... }
fn host(&self) -> Option<u32> { ... }
}Expand description
Changes a tree, or bridges it into another kind of tree.
Required Methods§
fn input(&self) -> TreeKind
fn output(&self) -> TreeKind
fn run<'a>( &self, tree: Tree<'a>, file: &mut File, alloc: &'a Allocator, ) -> Result<Tree<'a>, Error>
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".