Skip to main content

AsHashDB

Trait AsHashDB 

Source
pub trait AsHashDB<H: Hasher, T> {
    // Required methods
    fn as_hash_db(&self) -> &dyn HashDB<H, T>;
    fn as_hash_db_mut<'a>(&'a mut self) -> &'a mut (dyn HashDB<H, T> + 'a);
}
Expand description

Upcast trait for HashDB.

Required Methods§

Source

fn as_hash_db(&self) -> &dyn HashDB<H, T>

Perform upcast to HashDB for anything that derives from HashDB.

Source

fn as_hash_db_mut<'a>(&'a mut self) -> &'a mut (dyn HashDB<H, T> + 'a)

Perform mutable upcast to HashDB for anything that derives from HashDB.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<'a, H: Hasher, T> AsHashDB<H, T> for &'a mut dyn HashDB<H, T>