pub struct ChainStorage { /* private fields */ }Implementations§
Source§impl ChainStorage
impl ChainStorage
pub fn new() -> Self
pub fn get_block(&self, height: u64) -> Option<&Block>
pub fn insert_block(&mut self, block: Block)
pub fn get_state(&self, address: &Address) -> Option<&AccountData>
pub fn set_state(&mut self, address: Address, account: AccountData)
pub fn get_all_state(&self) -> &HashMap<Address, AccountData>
pub fn current_height(&self) -> u64
pub fn get_genesis_hash(&self) -> Option<Hash32>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ChainStorage
impl RefUnwindSafe for ChainStorage
impl Send for ChainStorage
impl Sync for ChainStorage
impl Unpin for ChainStorage
impl UnsafeUnpin for ChainStorage
impl UnwindSafe for ChainStorage
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