[][src]Trait solana_sdk::instruction_processor_utils::State

pub trait State<T> {
    fn state(&self) -> Result<T, InstructionError>;
fn set_state(&mut self, state: &T) -> Result<(), InstructionError>; }

Conveinence trait to covert bincode errors to instruction errors.

Required methods

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

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

Loading content...

Implementors

impl<'a, T> State<T> for KeyedAccount<'a> where
    T: Serialize + DeserializeOwned
[src]

impl<T> State<T> for Account where
    T: Serialize + DeserializeOwned
[src]

Loading content...