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§
Sourcefn estimate_encoded_size(&self) -> usize
fn estimate_encoded_size(&self) -> usize
Returns the storage proof size.
Provided Methods§
Sourcefn start_transaction(&mut self, is_host: bool)
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.
Sourcefn rollback_transaction(&mut self, is_host: bool)
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.
Sourcefn commit_transaction(&mut self, is_host: bool)
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.