pub enum LoadedProgramType {
FailedVerification(ProgramRuntimeEnvironment),
Closed,
DelayVisibility,
Unloaded(ProgramRuntimeEnvironment),
LegacyV0(Executable<InvokeContext<'static>>),
LegacyV1(Executable<InvokeContext<'static>>),
Typed(Executable<InvokeContext<'static>>),
Builtin(BuiltinProgram<InvokeContext<'static>>),
}
Expand description
Actual payload of LoadedProgram.
Variants§
FailedVerification(ProgramRuntimeEnvironment)
Tombstone for programs which did not pass the verifier.
These can potentially come back alive if the environment changes.
Closed
Tombstone for programs which were explicitly undeployoed / closed.
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.
LegacyV0(Executable<InvokeContext<'static>>)
Verified and compiled program of loader-v1 or loader-v2
LegacyV1(Executable<InvokeContext<'static>>)
Verified and compiled program of loader-v3 (aka upgradable loader)
Typed(Executable<InvokeContext<'static>>)
Verified and compiled program of loader-v4
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 LoadedProgramType
impl LoadedProgramType
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 LoadedProgramType
impl Debug for LoadedProgramType
Source§impl Default for LoadedProgramType
impl Default for LoadedProgramType
Source§fn default() -> LoadedProgramType
fn default() -> LoadedProgramType
Auto Trait Implementations§
impl Freeze for LoadedProgramType
impl RefUnwindSafe for LoadedProgramType
impl Send for LoadedProgramType
impl Sync for LoadedProgramType
impl Unpin for LoadedProgramType
impl !UnwindSafe for LoadedProgramType
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