pub struct StateActionDeserializerRegistry { /* private fields */ }Expand description
Registry that maps state_type_name → factory closure for reconstructing
AnyStateAction from a SerializedStateAction.
Built once at agent construction (alongside StateScopeRegistry and
LatticeRegistry) by calling register::<S>() for every StateSpec type.
Implementations§
Source§impl StateActionDeserializerRegistry
impl StateActionDeserializerRegistry
pub fn new() -> Self
Sourcepub fn register<S: StateSpec>(&mut self)
pub fn register<S: StateSpec>(&mut self)
Register a StateSpec type so its actions can be deserialized.
Sourcepub fn deserialize(
&self,
entry: &SerializedStateAction,
) -> Result<AnyStateAction, StateActionDecodeError>
pub fn deserialize( &self, entry: &SerializedStateAction, ) -> Result<AnyStateAction, StateActionDecodeError>
Deserialize a SerializedStateAction back into an AnyStateAction.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StateActionDeserializerRegistry
impl !RefUnwindSafe for StateActionDeserializerRegistry
impl Send for StateActionDeserializerRegistry
impl Sync for StateActionDeserializerRegistry
impl Unpin for StateActionDeserializerRegistry
impl !UnwindSafe for StateActionDeserializerRegistry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more