pub struct Kernel { /* private fields */ }Implementations§
Source§impl Kernel
impl Kernel
pub fn new() -> Self
pub fn create_account(&mut self, address: Address, data: AccountData)
pub fn get_account(&self, address: &Address) -> Option<&AccountData>
pub fn account_exists(&self, address: &Address) -> bool
pub fn transfer( &mut self, from: &Address, to: &Address, amount: u128, ) -> Result<(), KernelError>
pub fn increment_nonce(&mut self, address: &Address) -> Result<(), KernelError>
pub fn validate_transaction(&self, tx: &Transaction) -> Result<(), KernelError>
pub fn apply_transaction( &mut self, tx: &Transaction, ) -> Result<Receipt, KernelError>
pub fn get_block_height(&self) -> u64
pub fn set_block_height(&mut self, height: u64)
pub fn state(&self) -> &State
pub fn state_mut(&mut self) -> &mut State
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Kernel
impl RefUnwindSafe for Kernel
impl Send for Kernel
impl Sync for Kernel
impl Unpin for Kernel
impl UnsafeUnpin for Kernel
impl UnwindSafe for Kernel
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