Trait HandlerContext

Source
pub trait HandlerContext<'a, 'b, 'c>: Sized {
    // Required method
    fn from_entrypoint(
        program_id: &'a Pubkey,
        accounts: &mut &'b [AccountInfo],
        instruction_data: &mut &'c [u8],
    ) -> Result<Self, Error>;
}

Required Methods§

Source

fn from_entrypoint( program_id: &'a Pubkey, accounts: &mut &'b [AccountInfo], instruction_data: &mut &'c [u8], ) -> Result<Self, Error>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<'b> HandlerContext<'_, 'b, '_> for &'b [AccountInfo]

Source§

fn from_entrypoint( _program_id: &Pubkey, accounts: &mut &'b [AccountInfo], _instruction_data: &mut &[u8], ) -> Result<Self, Error>

Implementors§

Source§

impl<'a> HandlerContext<'a, '_, '_> for ProgramIdArg<'a>

Source§

impl<'c, T> HandlerContext<'_, '_, 'c> for Arg<'c, T>
where T: AnyBitPattern,