pub struct RpcClient<R, W> { /* private fields */ }Implementations§
Source§impl RpcClient<OwnedReadHalf<TcpStream>, OwnedWriteHalf<TcpStream>>
impl RpcClient<OwnedReadHalf<TcpStream>, OwnedWriteHalf<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<R: AsyncRead + Unpin + 'static, W: AsyncWrite + Unpin + 'static> RpcClient<R, W>
impl<R: AsyncRead + Unpin + 'static, W: AsyncWrite + Unpin + 'static> RpcClient<R, W>
pub async fn get(&mut self, key: &[u8]) -> Result<Option<Vec<u8>>>
pub async fn contains(&mut self, key: &[u8]) -> Result<Option<u32>>
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>>, ) -> Result<Vec<(Vec<u8>, Vec<u8>)>>
pub async fn range_keys( &mut self, start: Bound<Vec<u8>>, end: Bound<Vec<u8>>, ) -> 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 apply_batch( &mut self, items: Vec<(Vec<u8>, Option<Vec<u8>>)>, ) -> Result<()>
Auto Trait Implementations§
impl<R, W> Freeze for RpcClient<R, W>
impl<R, W> !RefUnwindSafe for RpcClient<R, W>
impl<R, W> !Send for RpcClient<R, W>
impl<R, W> !Sync for RpcClient<R, W>
impl<R, W> Unpin for RpcClient<R, W>
impl<R, W> UnsafeUnpin for RpcClient<R, W>where
W: UnsafeUnpin,
R: UnsafeUnpin,
impl<R, W> !UnwindSafe for RpcClient<R, W>
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