pub struct LoadedProgram {
pub program: LoadedProgramType,
pub account_size: usize,
pub deployment_slot: Slot,
pub effective_slot: Slot,
pub maybe_expiration_slot: Option<Slot>,
pub tx_usage_counter: AtomicU64,
pub ix_usage_counter: AtomicU64,
}
Fields§
§program: LoadedProgramType
The program of this entry
account_size: usize
Size of account that stores the program and program data
deployment_slot: Slot
Slot in which the program was (re)deployed
effective_slot: Slot
Slot in which this entry will become active (can be in the future)
maybe_expiration_slot: Option<Slot>
Optional expiration slot for this entry, after which it is treated as non-existent
tx_usage_counter: AtomicU64
How often this entry was used by a transaction
ix_usage_counter: AtomicU64
How often this entry was used by a transaction
Implementations§
source§impl LoadedProgram
impl LoadedProgram
sourcepub fn new(
loader_key: &Pubkey,
program_runtime_environment: Arc<BuiltinProgram<InvokeContext<'static>>>,
deployment_slot: Slot,
effective_slot: Slot,
maybe_expiration_slot: Option<Slot>,
elf_bytes: &[u8],
account_size: usize,
metrics: &mut LoadProgramMetrics
) -> Result<Self, Box<dyn Error>>
pub fn new( loader_key: &Pubkey, program_runtime_environment: Arc<BuiltinProgram<InvokeContext<'static>>>, deployment_slot: Slot, effective_slot: Slot, maybe_expiration_slot: Option<Slot>, elf_bytes: &[u8], account_size: usize, metrics: &mut LoadProgramMetrics ) -> Result<Self, Box<dyn Error>>
Creates a new user program
pub fn to_unloaded(&self) -> Option<Self>
sourcepub fn new_builtin(
deployment_slot: Slot,
account_size: usize,
entrypoint: ProcessInstructionWithContext
) -> Self
pub fn new_builtin( deployment_slot: Slot, account_size: usize, entrypoint: ProcessInstructionWithContext ) -> Self
Creates a new built-in program
pub fn new_tombstone(slot: Slot, reason: LoadedProgramType) -> Self
pub fn is_tombstone(&self) -> bool
Trait Implementations§
source§impl AbiExample for LoadedProgram
impl AbiExample for LoadedProgram
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
Auto Trait Implementations§
impl RefUnwindSafe for LoadedProgram
impl Send for LoadedProgram
impl Sync for LoadedProgram
impl Unpin for LoadedProgram
impl !UnwindSafe for LoadedProgram
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more