[−][src]Struct memchain::Memchain
Fields
name: String
blocks: Vec<Block<'bc>>
base_gas: u64
Methods
impl<'bc> Memchain<'bc>
[src]
pub fn new<S: AsRef<str>>(
name: S,
genesis_state: HashMap<Address, Cow<'bc, Account>>,
base_gas: u64
) -> Self
[src]
name: S,
genesis_state: HashMap<Address, Cow<'bc, Account>>,
base_gas: u64
) -> Self
pub fn create_block(&mut self) -> &mut Block<'bc>
[src]
Trait Implementations
impl<'bc> Blockchain for Memchain<'bc>
[src]
fn name(&self) -> &str
[src]
fn block(&self, height: usize) -> Option<&dyn Block>
[src]
fn last_block(&self) -> &dyn Block
[src]
fn last_block_mut(&mut self) -> &mut dyn Block
[src]
impl<'bc> Debug for Memchain<'bc>
[src]
Auto Trait Implementations
impl<'bc> RefUnwindSafe for Memchain<'bc>
impl<'bc> Send for Memchain<'bc>
impl<'bc> Sync for Memchain<'bc>
impl<'bc> Unpin for Memchain<'bc>
impl<'bc> UnwindSafe for Memchain<'bc>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,