[][src]Struct exonum_configuration::Schema

pub struct Schema<T> { /* fields omitted */ }

Database schema used by the configuration service.

Methods

impl<T> Schema<T> where
    T: AsRef<dyn Snapshot>, 
[src]

pub fn new(snapshot: T) -> Schema<T>[src]

Creates a new schema.

pub fn propose_data_by_config_hash(
    &self
) -> ProofMapIndex<&dyn Snapshot, Hash, ProposeData>
[src]

Returns propose information indexed by the hash of the configuration corresponding to a proposal.

Consult the crate-level docs for details how hashes of the configuration are calculated.

pub fn config_hash_by_ordinal(&self) -> ProofListIndex<&dyn Snapshot, Hash>[src]

Returns a table of hashes of proposed configurations in the commit order.

pub fn votes_by_config_hash(
    &self,
    config_hash: &Hash
) -> ProofListIndex<&dyn Snapshot, MaybeVote>
[src]

Returns a table of votes of validators for a particular proposal, referenced by its configuration hash.

pub fn propose(&self, cfg_hash: &Hash) -> Option<Propose>[src]

Returns a Propose transaction with a particular configuration hash.

pub fn votes(&self, cfg_hash: &Hash) -> Vec<Option<VotingDecision>>[src]

Returns a list of votes for the proposal corresponding to the given configuration hash.

pub fn state_hash(&self) -> Vec<Hash>[src]

Returns state hash values used by the configuration service.

Trait Implementations

impl<T: Debug> Debug for Schema<T>[src]

Auto Trait Implementations

impl<T> Send for Schema<T> where
    T: Send

impl<T> Sync for Schema<T> where
    T: Sync

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T

impl<T> Same for T

type Output = T

Should always be Self