pub enum SystemInstruction {
CreateAccount {
tokens: u64,
space: u64,
program_id: Pubkey,
},
Assign {
program_id: Pubkey,
},
Move {
tokens: u64,
},
Spawn,
}
Variants
CreateAccount
Create a new account
- Transaction::keys[0] - source
- Transaction::keys[1] - new account key
- tokens - number of tokens to transfer to the new account
- space - memory to allocate if greater then zero
- program_id - the program id of the new account
Assign
Fields
program_id: Pubkey
Assign account to a program
- Transaction::keys[0] - account to assign
Move
Fields
tokens: u64
Move tokens
- Transaction::keys[0] - source
- Transaction::keys[1] - destination
Spawn
Spawn a new program from an account
Trait Implementations
sourceimpl Clone for SystemInstruction
impl Clone for SystemInstruction
sourcefn clone(&self) -> SystemInstruction
fn clone(&self) -> SystemInstruction
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for SystemInstruction
impl Debug for SystemInstruction
sourceimpl<'de> Deserialize<'de> for SystemInstruction
impl<'de> Deserialize<'de> for SystemInstruction
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Serialize for SystemInstruction
impl Serialize for SystemInstruction
Auto Trait Implementations
impl RefUnwindSafe for SystemInstruction
impl Send for SystemInstruction
impl Sync for SystemInstruction
impl Unpin for SystemInstruction
impl UnwindSafe for SystemInstruction
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more