pub struct Processor<Request, Response> { /* private fields */ }
Expand description
Requests processor.
Implementations§
Source§impl<Request, Response> Processor<Request, Response>where
for<'de> Request: Serialize + Deserialize<'de>,
for<'de> Response: Serialize + Deserialize<'de>,
impl<Request, Response> Processor<Request, Response>where
for<'de> Request: Serialize + Deserialize<'de>,
for<'de> Response: Serialize + Deserialize<'de>,
Sourcepub fn run_loop<P>(&self, proletarian: P) -> Result<(), Error>where
P: Proletarian<Request, Response>,
pub fn run_loop<P>(&self, proletarian: P) -> Result<(), Error>where
P: Proletarian<Request, Response>,
Runs infinitely, processing incoming request using a given closure and sending generated responses back to the clients.
The loafer
is called every time there are no more messages in the queue.
Auto Trait Implementations§
impl<Request, Response> Freeze for Processor<Request, Response>
impl<Request, Response> RefUnwindSafe for Processor<Request, Response>
impl<Request, Response> Send for Processor<Request, Response>
impl<Request, Response> Sync for Processor<Request, Response>
impl<Request, Response> Unpin for Processor<Request, Response>
impl<Request, Response> UnwindSafe for Processor<Request, Response>
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