pub trait Decompose {
type Decomposition;
// Required methods
fn compose(decomposition: Self::Decomposition) -> Self
where Self: Sized;
fn decompose(self) -> Self::Decomposition
where Self: Sized;
fn decompose_cloned(&self) -> Self::Decomposition;
}Expand description
trait to decompose AI modules into components that implement other libraries’ traits
Required Associated Types§
Sourcetype Decomposition
type Decomposition
the decomposed type
Required Methods§
Sourcefn compose(decomposition: Self::Decomposition) -> Selfwhere
Self: Sized,
fn compose(decomposition: Self::Decomposition) -> Selfwhere
Self: Sized,
recreates from the decomposition
Sourcefn decompose(self) -> Self::Decompositionwhere
Self: Sized,
fn decompose(self) -> Self::Decompositionwhere
Self: Sized,
owned decomposition
Sourcefn decompose_cloned(&self) -> Self::Decomposition
fn decompose_cloned(&self) -> Self::Decomposition
decomposition that copies data