Skip to main content

RuntimeAccountLoader

Trait RuntimeAccountLoader 

Source
pub trait RuntimeAccountLoader {
    // Required method
    fn load_account(&self, pubkey: &Pubkey) -> Result<Option<StoredAccount>, ()>;
}
Expand description

Runtime account loader.

Used by the RISC-V VM to load accounts into VM during runtime of the program.

Required Methods§

Source

fn load_account(&self, pubkey: &Pubkey) -> Result<Option<StoredAccount>, ()>

Attempt to load the account info of pubkey.

Returns Ok(Some(AccountSharedData)) on success. Returns Ok(None) if the account was not found. Returns Err(()) if there was an error with account loading that should abort the program.

Implementors§