pub struct Client { /* private fields */ }Implementations§
Source§impl Client
impl Client
pub async fn connect<T: ToSocketAddrs>(addr: T) -> Result<Client>
pub async fn version(&mut self) -> Result<Bytes>
pub async fn ping(&mut self, msg: Option<Bytes>) -> Result<Bytes>
pub async fn dump(&mut self, path: &Path) -> Result<()>
pub async fn load(&mut self, path: &Path) -> Result<()>
pub async fn get(&mut self, key: &str) -> Result<Option<Bytes>>
pub async fn set(&mut self, key: &str, value: Bytes) -> Result<()>
pub async fn set_expires( &mut self, key: &str, value: Bytes, expiration: Duration, ) -> Result<()>
pub async fn publish(&mut self, channel: &str, message: Bytes) -> Result<u64>
pub async fn subscribe(self, channels: Vec<String>) -> Result<Subscriber>
Auto Trait Implementations§
impl !Freeze for Client
impl RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnwindSafe for Client
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