pub struct LoadedProgram {
pub program: LoadedProgramType,
pub account_size: usize,
pub deployment_slot: Slot,
pub effective_slot: Slot,
pub usage_counter: AtomicU64,
}Fields§
§program: LoadedProgramTypeThe program of this entry
account_size: usizeSize of account that stores the program and program data
deployment_slot: SlotSlot in which the program was (re)deployed
effective_slot: SlotSlot in which this entry will become active (can be in the future)
usage_counter: AtomicU64How often this entry was used
Implementations§
source§impl LoadedProgram
impl LoadedProgram
sourcepub fn new(
loader_key: &Pubkey,
loader: Arc<BuiltInProgram<InvokeContext<'static>>>,
deployment_slot: Slot,
elf_bytes: &[u8],
account_size: usize,
use_jit: bool,
metrics: &mut LoadProgramMetrics
) -> Result<Self, EbpfError>
pub fn new( loader_key: &Pubkey, loader: Arc<BuiltInProgram<InvokeContext<'static>>>, deployment_slot: Slot, elf_bytes: &[u8], account_size: usize, use_jit: bool, metrics: &mut LoadProgramMetrics ) -> Result<Self, EbpfError>
Creates a new user program
sourcepub fn new_built_in(
deployment_slot: Slot,
program: BuiltInProgram<InvokeContext<'static>>
) -> Self
pub fn new_built_in( deployment_slot: Slot, program: BuiltInProgram<InvokeContext<'static>> ) -> Self
Creates a new built-in program
pub fn new_tombstone() -> Self
pub fn is_tombstone(&self) -> bool
Trait Implementations§
source§impl Debug for LoadedProgram
impl Debug for LoadedProgram
source§impl Default for LoadedProgram
impl Default for LoadedProgram
source§fn default() -> LoadedProgram
fn default() -> LoadedProgram
Returns the “default value” for a type. Read more