pub struct ProofSizeExt(pub Box<dyn ProofSizeProvider + Sync + Send + 'static>);Expand description
The proof size extension to fetch the current storage proof size in externalities.
Tuple Fields§
§0: Box<dyn ProofSizeProvider + Sync + Send + 'static>Implementations§
Source§impl ProofSizeExt
impl ProofSizeExt
Sourcepub fn new<T: ProofSizeProvider + Sync + Send + 'static>(recorder: T) -> Self
pub fn new<T: ProofSizeProvider + Sync + Send + 'static>(recorder: T) -> Self
Creates a new instance of ProofSizeExt.
Sourcepub fn storage_proof_size(&self) -> u64
pub fn storage_proof_size(&self) -> u64
Returns the storage proof size.
Trait Implementations§
Source§impl Deref for ProofSizeExt
impl Deref for ProofSizeExt
Source§impl DerefMut for ProofSizeExt
impl DerefMut for ProofSizeExt
Source§impl Extension for ProofSizeExt
impl Extension for ProofSizeExt
Source§fn as_mut_any(&mut self) -> &mut dyn Any
fn as_mut_any(&mut self) -> &mut dyn Any
Return the extension as
&mut dyn Any. Read moreSource§fn start_transaction(&mut self, ty: TransactionType)
fn start_transaction(&mut self, ty: TransactionType)
Start a transaction of type
ty.Source§fn rollback_transaction(&mut self, ty: TransactionType)
fn rollback_transaction(&mut self, ty: TransactionType)
Rollback a transaction of type
ty.Source§fn commit_transaction(&mut self, ty: TransactionType)
fn commit_transaction(&mut self, ty: TransactionType)
Commit a transaction of type
ty.Source§impl From<Box<dyn ProofSizeProvider + Sync + Send>> for ProofSizeExt
impl From<Box<dyn ProofSizeProvider + Sync + Send>> for ProofSizeExt
Auto Trait Implementations§
impl Freeze for ProofSizeExt
impl !RefUnwindSafe for ProofSizeExt
impl Send for ProofSizeExt
impl Sync for ProofSizeExt
impl Unpin for ProofSizeExt
impl !UnwindSafe for ProofSizeExt
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T, Outer> IsWrappedBy<Outer> for T
impl<T, Outer> IsWrappedBy<Outer> for T
Source§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
Source§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
The counterpart to
unchecked_from.