pub trait StateMut<T> {
    // Required methods
    fn state(&self) -> Result<T, InstructionError>;
    fn set_state(&mut self, state: &T) -> Result<(), InstructionError>;
}
Expand description

Convenience trait to covert bincode errors to instruction errors.

Required Methods§

source

fn state(&self) -> Result<T, InstructionError>

source

fn set_state(&mut self, state: &T) -> Result<(), InstructionError>

Implementations on Foreign Types§

source§

impl<T> StateMut<T> for Ref<'_, AccountSharedData>where T: Serialize + DeserializeOwned,

Implementors§