Struct avalanche_types::subnet::rpc::database::rpcdb::client::DatabaseClient
source · pub struct DatabaseClient { /* private fields */ }
Expand description
DatabaseClient is an implementation of crate::subnet::rpc::database::Database
that talks over RPC.
ref. https://pkg.go.dev/github.com/ava-labs/avalanchego/database/rpcdb#DatabaseClient
Implementations§
source§impl DatabaseClient
impl DatabaseClient
pub fn new(client_conn: Channel) -> BoxedDatabase
Trait Implementations§
source§impl Checkable for DatabaseClient
impl Checkable for DatabaseClient
source§impl Clone for DatabaseClient
impl Clone for DatabaseClient
source§fn clone(&self) -> DatabaseClient
fn clone(&self) -> DatabaseClient
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Closer for DatabaseClient
impl Closer for DatabaseClient
source§impl Iteratee for DatabaseClient
impl Iteratee for DatabaseClient
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::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::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::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::Iteratee
] trait.
source§impl KeyValueReaderWriterDeleter for DatabaseClient
impl KeyValueReaderWriterDeleter for DatabaseClient
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 DatabaseClient
Auto Trait Implementations§
impl !RefUnwindSafe for DatabaseClient
impl Send for DatabaseClient
impl Sync for DatabaseClient
impl Unpin for DatabaseClient
impl !UnwindSafe for DatabaseClient
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