Trait solana_sdk::account::WritableAccount
source · [−]pub trait WritableAccount: ReadableAccount {
fn set_lamports(&mut self, lamports: u64);
fn data_mut(&mut self) -> &mut Vec<u8>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
;
fn data_as_mut_slice(&mut self) -> &mut [u8]ⓘNotable traits for &[u8]impl Read for &[u8]impl Write for &mut [u8]
;
fn set_owner(&mut self, owner: Pubkey);
fn copy_into_owner_from_slice(&mut self, source: &[u8]);
fn set_executable(&mut self, executable: bool);
fn set_rent_epoch(&mut self, epoch: Epoch);
fn create(
lamports: u64,
data: Vec<u8>,
owner: Pubkey,
executable: bool,
rent_epoch: Epoch
) -> Self;
fn checked_add_lamports(
&mut self,
lamports: u64
) -> Result<(), LamportsError> { ... }
fn checked_sub_lamports(
&mut self,
lamports: u64
) -> Result<(), LamportsError> { ... }
fn saturating_add_lamports(&mut self, lamports: u64) { ... }
fn saturating_sub_lamports(&mut self, lamports: u64) { ... }
}
Required Methods
fn set_lamports(&mut self, lamports: u64)
fn data_mut(&mut self) -> &mut Vec<u8>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,