pub struct MockStorage { /* private fields */ }Expand description
Mock storage that simulates Neo blockchain storage
Implementations§
Source§impl MockStorage
impl MockStorage
pub fn new() -> Self
pub fn get(&self, key: &[u8]) -> Option<Vec<u8>>
pub fn put(&mut self, key: &[u8], value: &[u8])
pub fn delete(&mut self, key: &[u8])
pub fn contains(&self, key: &[u8]) -> bool
pub fn clear(&mut self)
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn keys(&self) -> Vec<Vec<u8>>
pub fn find(&self, prefix: &[u8]) -> Vec<(Vec<u8>, Vec<u8>)>
Trait Implementations§
Source§impl Clone for MockStorage
impl Clone for MockStorage
Source§fn clone(&self) -> MockStorage
fn clone(&self) -> MockStorage
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MockStorage
impl Debug for MockStorage
Source§impl Default for MockStorage
impl Default for MockStorage
Source§fn default() -> MockStorage
fn default() -> MockStorage
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MockStorage
impl RefUnwindSafe for MockStorage
impl Send for MockStorage
impl Sync for MockStorage
impl Unpin for MockStorage
impl UnsafeUnpin for MockStorage
impl UnwindSafe for MockStorage
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