pub enum ProgramCacheEntryType {
FailedVerification(ProgramRuntimeEnvironment),
Closed,
DelayVisibility,
Unloaded(ProgramRuntimeEnvironment),
Loaded(Executable<InvokeContext<'static>>),
Builtin(BuiltinProgram<InvokeContext<'static>>),
}
Expand description
Actual payload of ProgramCacheEntry.
Variants§
FailedVerification(ProgramRuntimeEnvironment)
Tombstone for programs which currently do not pass the verifier but could if the feature set changed.
Closed
Tombstone for programs that were either explicitly closed or never deployed.
It’s also used for accounts belonging to program loaders, that don’t actually contain program code (e.g. buffer accounts for LoaderV3 programs).
DelayVisibility
Tombstone for programs which have recently been modified but the new version is not visible yet.
Unloaded(ProgramRuntimeEnvironment)
Successfully verified but not currently compiled.
It continues to track usage statistics even when the compiled executable of the program is evicted from memory.
Loaded(Executable<InvokeContext<'static>>)
Verified and compiled program
Builtin(BuiltinProgram<InvokeContext<'static>>)
A built-in program which is not stored on-chain but backed into and distributed with the validator
Implementations§
Source§impl ProgramCacheEntryType
impl ProgramCacheEntryType
Sourcepub fn get_environment(&self) -> Option<&ProgramRuntimeEnvironment>
pub fn get_environment(&self) -> Option<&ProgramRuntimeEnvironment>
Returns a reference to its environment if it has one
Trait Implementations§
Source§impl Debug for ProgramCacheEntryType
impl Debug for ProgramCacheEntryType
Source§impl Default for ProgramCacheEntryType
impl Default for ProgramCacheEntryType
Source§fn default() -> ProgramCacheEntryType
fn default() -> ProgramCacheEntryType
Auto Trait Implementations§
impl Freeze for ProgramCacheEntryType
impl RefUnwindSafe for ProgramCacheEntryType
impl Send for ProgramCacheEntryType
impl Sync for ProgramCacheEntryType
impl Unpin for ProgramCacheEntryType
impl !UnwindSafe for ProgramCacheEntryType
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
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>
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>
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