pub trait RuntimeStateComponents<B: NeuralBackend>: RuntimeLayerState<B> {
// Required methods
fn position(&self) -> i32;
fn fixed_component(
&mut self,
role: StateTensorRole,
) -> Result<&mut Option<B::Tensor>, StateError>;
fn advance_fixed(&mut self, tokens: i32) -> Result<(), StateError>;
}Expand description
Mutable access to architecture-declared fixed state components.
Operators address semantic roles rather than backend storage. Concrete realizations keep native tensors and may combine these slots with an append-only attention cache in the same layer state.
Required Methods§
Sourcefn fixed_component(
&mut self,
role: StateTensorRole,
) -> Result<&mut Option<B::Tensor>, StateError>
fn fixed_component( &mut self, role: StateTensorRole, ) -> Result<&mut Option<B::Tensor>, StateError>
Borrows the optional tensor slot for one declared fixed component.
Sourcefn advance_fixed(&mut self, tokens: i32) -> Result<(), StateError>
fn advance_fixed(&mut self, tokens: i32) -> Result<(), StateError>
Advances a fixed-state-only layer after a successful operator call.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".