pub trait ArchitectureStateFactory<B: NeuralBackend> {
type State: RuntimeState<B>;
type Error;
// Required method
fn realize(
&mut self,
layout: &StateLayout,
) -> Result<Self::State, Self::Error>;
}Expand description
Additive backend mechanism for realizing an architecture-declared state layout.
Ordinary key/value architectures need not implement this extension: it is selected only by composition that requires a distinct concrete state representation, such as a layout combining attention and fixed components.
Required Associated Types§
Sourcetype State: RuntimeState<B>
type State: RuntimeState<B>
Concrete state returned by this realization mechanism.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".