SystemInstruction

Enum SystemInstruction 

Source
pub enum SystemInstruction {
Show 13 variants CreateAccount { lamports: u64, space: u64, }, Assign, Transfer { lamports: u64, }, CreateAccountWithSeed { lamports: u64, space: u64, }, AdvanceNonceAccount, WithdrawNonceAccount { lamports: u64, }, InitializeNonceAccount, AuthorizeNonceAccount, Allocate { space: u64, }, AllocateWithSeed { space: u64, }, AssignWithSeed, TransferWithSeed { lamports: u64, }, UpgradeNonceAccount,
}
Expand description

Solana System Program instructions.

The System Program uses a 4-byte discriminator (u32 little-endian). Each variant’s discriminator is its position in this enum (0, 1, 2, …).

Variants§

§

CreateAccount

Create a new account (index 0) Data: lamports (u64) + space (u64) + owner (Pubkey)

Fields

§lamports: u64
§space: u64
§

Assign

Assign account to a program (index 1) Data: owner (Pubkey)

§

Transfer

Transfer lamports (index 2) Data: lamports (u64)

Fields

§lamports: u64
§

CreateAccountWithSeed

Create account with seed (index 3) Data: base (Pubkey) + seed (String) + lamports (u64) + space (u64) + owner (Pubkey)

Fields

§lamports: u64
§space: u64
§

AdvanceNonceAccount

Advance nonce account (index 4)

§

WithdrawNonceAccount

Withdraw from nonce account (index 5) Data: lamports (u64)

Fields

§lamports: u64
§

InitializeNonceAccount

Initialize nonce account (index 6) Data: authority (Pubkey)

§

AuthorizeNonceAccount

Authorize nonce account (index 7) Data: new_authority (Pubkey)

§

Allocate

Allocate space for account (index 8) Data: space (u64)

Fields

§space: u64
§

AllocateWithSeed

Allocate space with seed (index 9) Data: base (Pubkey) + seed (String) + space (u64) + owner (Pubkey)

Fields

§space: u64
§

AssignWithSeed

Assign account with seed (index 10) Data: base (Pubkey) + seed (String) + owner (Pubkey)

§

TransferWithSeed

Transfer with seed (index 11) Data: lamports (u64) + from_seed (String) + from_owner (Pubkey)

Fields

§lamports: u64
§

UpgradeNonceAccount

Upgrade nonce account (index 12)

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V