pub struct SimpleClient {
pub codec: Codec,
pub io: RefCell<Option<TcpStream>>,
}Expand description
Redis client
Fields§
§codec: Codec§io: RefCell<Option<TcpStream>>Implementations§
Source§impl SimpleClient
impl SimpleClient
Sourcepub fn exec<U>(&self, cmd: U) -> Result<U::Output, CommandError>where
U: Command,
pub fn exec<U>(&self, cmd: U) -> Result<U::Output, CommandError>where
U: Command,
Execute redis command
pub fn encode<U: Command>(&self, cmd: U) -> Result<BytesMut, Error>
pub fn encode_req(&self, req: Request, buf: &mut BytesMut) -> Result<(), Error>
pub fn send(&self, arg: &BytesMut) -> Result<Response, CommandError>
pub fn decode<U>(&self, resp: Response) -> Result<U::Output, CommandError>where
U: Command,
pub fn is_closed(&self) -> bool
Trait Implementations§
impl Send for SimpleClient
impl Sync for SimpleClient
Auto Trait Implementations§
impl !Freeze for SimpleClient
impl !RefUnwindSafe for SimpleClient
impl Unpin for SimpleClient
impl !UnwindSafe for SimpleClient
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> 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