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
Auto Trait Implementations§
impl !Freeze for LoadedProgram
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more