pub struct RpcClient<S> { /* private fields */ }Implementations§
Source§impl RpcClient<TcpStream>
impl RpcClient<TcpStream>
pub async fn connect_tcp( addr: impl ToSocketAddrsAsync, hashname: u64, ) -> Result<Self>
pub async fn connect_tcp_by_name( addr: impl ToSocketAddrsAsync, name: &str, ) -> Result<Self>
Source§impl RpcClient<UnixStream>
impl RpcClient<UnixStream>
Source§impl<S: AsyncRead + AsyncWrite + Unpin + 'static> RpcClient<S>
impl<S: AsyncRead + AsyncWrite + Unpin + 'static> RpcClient<S>
pub async fn get(&mut self, key: &[u8]) -> Result<Option<Vec<u8>>>
pub async fn contains(&mut self, key: &[u8]) -> Result<bool>
pub async fn first(&mut self) -> Result<Option<(Vec<u8>, Vec<u8>)>>
pub async fn last(&mut self) -> Result<Option<(Vec<u8>, Vec<u8>)>>
pub async fn range( &mut self, start: Bound<Vec<u8>>, end: Bound<Vec<u8>>, limit: u32, ) -> Result<Vec<(Vec<u8>, Vec<u8>)>>
pub async fn range_keys( &mut self, start: Bound<Vec<u8>>, end: Bound<Vec<u8>>, limit: u32, ) -> Result<Vec<Vec<u8>>>
pub async fn upsert( &mut self, key: UpsertKey, flag: Option<bool>, value: Vec<u8>, ) -> Result<Vec<u8>>
pub async fn remove(&mut self, key: &[u8], soft: bool) -> Result<()>
pub async fn take(&mut self, key: &[u8], soft: bool) -> Result<Option<Vec<u8>>>
pub async fn count(&mut self, exact: bool) -> Result<u64>
pub async fn entry_len(&mut self, key: &[u8]) -> Result<Option<u32>>
pub async fn apply_batch( &mut self, items: Vec<(Vec<u8>, Option<Vec<u8>>)>, ) -> Result<()>
Auto Trait Implementations§
impl<S> !RefUnwindSafe for RpcClient<S>
impl<S> !Send for RpcClient<S>
impl<S> !Sync for RpcClient<S>
impl<S> !UnwindSafe for RpcClient<S>
impl<S> Freeze for RpcClient<S>where
S: Freeze,
impl<S> Unpin for RpcClient<S>where
S: Unpin,
impl<S> UnsafeUnpin for RpcClient<S>where
S: UnsafeUnpin,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§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 more