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>>),
}
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
Unloaded(ProgramRuntimeEnvironment)
Successfully verified but not currently compiled, used to track usage statistics when a compiled program is evicted from memory.
LegacyV0(Executable<InvokeContext<'static>>)
LegacyV1(Executable<InvokeContext<'static>>)
Typed(Executable<InvokeContext<'static>>)
Builtin(BuiltinProgram<InvokeContext<'static>>)
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
Returns the “default value” for a type. Read more
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
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