[][src]Trait exonum_merkledb::access::RawAccess

pub trait RawAccess: Clone {
    type Changes: ChangeSet;
    fn snapshot(&self) -> &dyn Snapshot;
fn changes(&self, address: &ResolvedAddress) -> Self::Changes; }

Allows to read data from the database. The data consists of a snapshot and changes relative to this snapshot. Depending on the implementation, the changes can be empty, immutable or mutable.

This trait is rarely needs to be used directly; Access is a more high-level trait encompassing access to database. In particular, using snapshot() method to convert the implementation into &dyn Snapshot is logically incorrect, because the snapshot may not reflect the most recent state of RawAccess.

Associated Types

type Changes: ChangeSet

Type of the changes() that will be applied to the database.

Loading content...

Required methods

fn snapshot(&self) -> &dyn Snapshot

Reference to a Snapshot. This is the base relative to which the changes are defined.

fn changes(&self, address: &ResolvedAddress) -> Self::Changes

Returns changes related to specific address compared to the snapshot().

Loading content...

Implementations on Foreign Types

impl RawAccess for Rc<Fork>[src]

type Changes = ChangesMut<'static>

impl<'_> RawAccess for &'_ Box<dyn Snapshot>[src]

type Changes = ()

impl RawAccess for Rc<dyn Snapshot>[src]

type Changes = ()

impl RawAccess for Arc<dyn Snapshot>[src]

type Changes = ()

Loading content...

Implementors

impl RawAccess for OwnedReadonlyFork[src]

type Changes = ChangesRef<'static>

impl<'_> RawAccess for &'_ Patch[src]

type Changes = ()

impl<'_> RawAccess for &'_ dyn Snapshot[src]

type Changes = ()

impl<'a> RawAccess for &'a Fork[src]

type Changes = ChangesMut<'a>

impl<'a> RawAccess for GenericRawAccess<'a>[src]

type Changes = GenericChanges<'a>

impl<'a> RawAccess for ReadonlyFork<'a>[src]

type Changes = ChangesRef<'a>

Loading content...