[wallet] Expose an immutable reference to a wallet's database

This commit is contained in:
Alekos Filini 2021-10-23 15:00:09 +02:00
parent 2892edf94b
commit 12e51b3c06
No known key found for this signature in database
GPG Key ID: 431401E4A4530061

View File

@ -1447,6 +1447,11 @@ where
Ok(())
}
/// Return an immutable reference to the internal database
pub fn database(&self) -> impl std::ops::Deref<Target = D> + '_ {
self.database.borrow()
}
}
impl<B, D> Wallet<B, D>