Struct avalanche_types::subnet::rpc::database::corruptabledb::Database
source · pub struct Database { /* private fields */ }
Expand description
Database wrapper which blocks further calls to the database at first sign of corruption.
ref. https://pkg.go.dev/github.com/ava-labs/avalanchego/database/corruptabledb#Database
Implementations§
source§impl Database
impl Database
pub fn new(db: BoxedDatabase) -> BoxedDatabase
Trait Implementations§
source§impl Batcher for Database
impl Batcher for Database
source§fn new_batch<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<BoxedBatch>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn new_batch<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<BoxedBatch>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Implements the crate::subnet::rpc::database::batch::Batcher
trait.
source§impl Iteratee for Database
impl Iteratee for Database
source§fn new_iterator<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<BoxedIterator>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn new_iterator<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<BoxedIterator>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Implements the crate::subnet::rpc::database::iterator::Iteratee
trait.
source§fn new_iterator_with_start<'life0, 'life1, 'async_trait>(
&'life0 self,
start: &'life1 [u8]
) -> Pin<Box<dyn Future<Output = Result<BoxedIterator>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn new_iterator_with_start<'life0, 'life1, 'async_trait>( &'life0 self, start: &'life1 [u8] ) -> Pin<Box<dyn Future<Output = Result<BoxedIterator>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
Implements the crate::subnet::rpc::database::iterator::Iteratee
trait.
source§fn new_iterator_with_prefix<'life0, 'life1, 'async_trait>(
&'life0 self,
prefix: &'life1 [u8]
) -> Pin<Box<dyn Future<Output = Result<BoxedIterator>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn new_iterator_with_prefix<'life0, 'life1, 'async_trait>( &'life0 self, prefix: &'life1 [u8] ) -> Pin<Box<dyn Future<Output = Result<BoxedIterator>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
Implements the crate::subnet::rpc::database::iterator::Iteratee
trait.
source§fn new_iterator_with_start_and_prefix<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
start: &'life1 [u8],
prefix: &'life2 [u8]
) -> Pin<Box<dyn Future<Output = Result<BoxedIterator>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn new_iterator_with_start_and_prefix<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, start: &'life1 [u8], prefix: &'life2 [u8] ) -> Pin<Box<dyn Future<Output = Result<BoxedIterator>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,
Implements the crate::subnet::rpc::database::iterator::Iteratee
trait.
source§impl KeyValueReaderWriterDeleter for Database
impl KeyValueReaderWriterDeleter for Database
source§fn has<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 [u8]
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn has<'life0, 'life1, 'async_trait>( &'life0 self, key: &'life1 [u8] ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
Attempts to return if the database has a key with the provided value.
source§fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 [u8]
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get<'life0, 'life1, 'async_trait>( &'life0 self, key: &'life1 [u8] ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
Attempts to return the value that was mapped to the key that was provided.
source§fn put<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
key: &'life1 [u8],
value: &'life2 [u8]
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn put<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, key: &'life1 [u8], value: &'life2 [u8] ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,
Attempts to set the value this key maps to.
impl Database for Database
Auto Trait Implementations§
impl !RefUnwindSafe for Database
impl Send for Database
impl Sync for Database
impl Unpin for Database
impl !UnwindSafe for Database
Blanket Implementations§
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request