referrerpolicy=no-referrer-when-downgrade

Trait ProofSizeProvider

Source
pub trait ProofSizeProvider {
    // Required method
    fn estimate_encoded_size(&self) -> usize;

    // Provided methods
    fn start_transaction(&mut self, is_host: bool) { ... }
    fn rollback_transaction(&mut self, is_host: bool) { ... }
    fn commit_transaction(&mut self, is_host: bool) { ... }
}
Expand description

Type that is able to provide a proof size estimation.

Required Methods§

Source

fn estimate_encoded_size(&self) -> usize

Returns the storage proof size.

Provided Methods§

Source

fn start_transaction(&mut self, is_host: bool)

Start a transaction.

is_host is set to true when the transaction was started by the host.

Source

fn rollback_transaction(&mut self, is_host: bool)

Rollback the last transaction.

is_host is set to true when the transaction to rollback was started by the host.

If there is no active transaction, the call should be ignored.

Source

fn commit_transaction(&mut self, is_host: bool)

Commit the last transaction.

is_host is set to true when the transaction to commit was started by the host.

If there is no active transaction, the call should be ignored.

Implementors§