pub struct QueuedClient<S: Read + Write + Source> { /* private fields */ }
Expand description
Implementations§
Source§impl<S: Read + Write + Source> QueuedClient<S>
impl<S: Read + Write + Source> QueuedClient<S>
Sourcepub fn new(client: Client<S>) -> Self
pub fn new(client: Client<S>) -> Self
New asynchronous client build on top of a synchronous client.
Sourcepub fn send_next(&mut self) -> ClientResult<bool>
pub fn send_next(&mut self) -> ClientResult<bool>
Write one pending request if any.
Instance of mio::Poll
generates a writable event only once until the socket returns WouldBlock
.
This error is mapped to ClientError::NotReady
.
Sourcepub fn receive_next(&mut self) -> ClientResult<Response>
pub fn receive_next(&mut self) -> ClientResult<Response>
Receive one response.
Must be called each time a readable event is returned by mio::Poll
.
Auto Trait Implementations§
impl<S> Freeze for QueuedClient<S>where
S: Freeze,
impl<S> RefUnwindSafe for QueuedClient<S>where
S: RefUnwindSafe,
impl<S> Send for QueuedClient<S>where
S: Send,
impl<S> Sync for QueuedClient<S>where
S: Sync,
impl<S> Unpin for QueuedClient<S>where
S: Unpin,
impl<S> UnwindSafe for QueuedClient<S>where
S: UnwindSafe,
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