#[repr(u8)]pub enum LoaderV4Instruction {
Write {
offset: u32,
bytes: Vec<u8>,
},
Truncate {
new_size: u32,
},
Deploy,
Retract,
TransferAuthority,
Finalize,
}
Variants§
Write
Write ELF data into an undeployed program account.
§Account references
[writable]
The program account to write to.[signer]
The authority of the program.
Truncate
Changes the size of an undeployed program account.
A program account is automatically initialized when its size is first increased. In this initial truncate, the program account needs to be a signer and it also sets the authority needed for subsequent operations. Decreasing to size zero closes the program account and resets it into an uninitialized state. Providing additional lamports upfront might be necessary to reach rent exemption. Superflous funds are transferred to the recipient account.
§Account references
[(signer), writable]
The program account to change the size of.[signer]
The authority of the program.[writable]
Optional, the recipient account.
Deploy
Verify the data of a program account to be a valid ELF.
If this succeeds the program becomes executable, and is ready to use. A source program account can be provided to overwrite the data before deployment in one step, instead retracting the program and writing to it and redeploying it. The source program is truncated to zero (thus closed) and lamports necessary for rent exemption are transferred, in case that the source was bigger than the program.
§Account references
[writable]
The program account to deploy.[signer]
The authority of the program.[writable]
Optional, an undeployed source program account to take data and lamports from.
Retract
Undo the deployment of a program account.
The program is no longer executable and goes into maintenance. Necessary for writing data and truncating.
§Account references
[writable]
The program account to retract.[signer]
The authority of the program.
TransferAuthority
Transfers the authority over a program account.
§Account references
[writable]
The program account to change the authority of.[signer]
The current authority of the program.[signer]
The new authority of the program.
Finalize
Finalizes the program account, rendering it immutable.
§Account references
[writable]
The program account to change the authority of.[signer]
The current authority of the program.[]
The next version of the program (can be itself).
Trait Implementations§
Source§impl Clone for LoaderV4Instruction
impl Clone for LoaderV4Instruction
Source§fn clone(&self) -> LoaderV4Instruction
fn clone(&self) -> LoaderV4Instruction
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for LoaderV4Instruction
impl Debug for LoaderV4Instruction
Source§impl<'de> Deserialize<'de> for LoaderV4Instruction
impl<'de> Deserialize<'de> for LoaderV4Instruction
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<LoaderV4Instruction, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<LoaderV4Instruction, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for LoaderV4Instruction
impl PartialEq for LoaderV4Instruction
Source§impl Serialize for LoaderV4Instruction
impl Serialize for LoaderV4Instruction
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Eq for LoaderV4Instruction
impl StructuralPartialEq for LoaderV4Instruction
Auto Trait Implementations§
impl Freeze for LoaderV4Instruction
impl RefUnwindSafe for LoaderV4Instruction
impl Send for LoaderV4Instruction
impl Sync for LoaderV4Instruction
impl Unpin for LoaderV4Instruction
impl UnwindSafe for LoaderV4Instruction
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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