pub struct Cache {
pub logs: Vec<(Buf, Vec<Int>)>,
pub events: Vec<Trace>,
pub sender: Option<Sender<Trace>>,
pub filter: u32,
pub fetched: Vec<Fetched>,
pub index: usize,
/* private fields */
}Fields§
§logs: Vec<(Buf, Vec<Int>)>§events: Vec<Trace>§sender: Option<Sender<Trace>>§filter: u32§fetched: Vec<Fetched>§index: usizeImplementations§
Source§impl Cache
impl Cache
pub fn new() -> Self
pub fn with_sender(sender: Sender<Trace>, filter: u32) -> Self
pub fn insert_account(&mut self, addr: Acc, account: Account)
pub fn account(&self, addr: &Acc) -> Option<&Account>
pub fn storage(&self, addr: &Acc, key: &Int) -> Option<Int>
pub fn reset(&mut self)
Trait Implementations§
Source§impl State for Cache
impl State for Cache
fn get(&mut self, acc: &Acc, key: &Int) -> Option<(Int, Int)>
fn put(&mut self, acc: &Acc, key: &Int, val: Int) -> Option<Int>
fn init(&mut self, acc: &Acc, key: &Int, val: Int)
fn tget(&mut self, acc: &Acc, key: &Int) -> Option<Int>
fn tput(&mut self, acc: Acc, key: Int, val: Int) -> Option<Int>
fn inc_nonce(&mut self, acc: &Acc, by: Int) -> Int
fn set_value(&mut self, acc: &Acc, value: Int) -> Int
fn set_code(&mut self, acc: &Acc, code: Buf, hash: Int) -> Int
fn set_auth(&mut self, src: &Acc, dst: &Acc)
fn merge(&mut self, acc: &Acc, chain: Account)
fn balance(&mut self, acc: &Acc) -> Option<Int>
fn nonce(&mut self, acc: &Acc) -> Option<Int>
fn code(&mut self, acc: &Acc) -> Option<(Buf, Int)>
fn acc(&mut self, acc: &Acc) -> Option<Account>
fn is_cold_acc(&self, acc: &Acc) -> bool
fn is_cold_key(&self, acc: &Acc, key: &Int) -> bool
fn warm_acc(&mut self, acc: &Acc) -> bool
fn warm_key(&mut self, acc: &Acc, key: &Int) -> bool
fn create(&mut self, acc: Acc, info: Account)
fn destroy(&mut self, acc: &Acc)
fn created(&self) -> Vec<Acc> ⓘ
fn destroyed(&self) -> Vec<Acc> ⓘ
fn head(&self, number: u64) -> Option<Head>
fn hash(&mut self, number: u64, hash: Int)
fn auth(&self, acc: &Acc) -> Option<Acc>
fn log(&mut self, data: Buf, topics: Vec<Int>)
fn get_depth(&mut self) -> usize
fn set_depth(&mut self, depth: usize)
fn emit(&mut self, event: Event) -> usize
fn save_fetched(&mut self, fetched: Fetched)
fn next_fetched(&mut self) -> Option<Fetched>
fn prefetched(&mut self, fetched: Vec<Fetched>)
fn is_offline(&self) -> bool
Source§fn checkpoint(&mut self) -> usize
fn checkpoint(&mut self) -> usize
Take a state checkpoint; returns an opaque ID that can be passed to
revert_to.fn apply(&mut self)
fn set_chain_id(&mut self, id: u64)
fn get_chain_id(&self) -> u64
fn is_tracing(&self) -> bool
fn reset(&mut self)
Auto Trait Implementations§
impl !RefUnwindSafe for Cache
impl !UnwindSafe for Cache
impl Freeze for Cache
impl Send for Cache
impl Sync for Cache
impl Unpin for Cache
impl UnsafeUnpin for Cache
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