Trait drone_core::proc_loop::Context [−][src]
pub trait Context<Req, ReqRes>: Copy + 'static { unsafe fn new() -> Self; fn req(self, req: Req) -> ReqRes; }
A token that allows suspending synchronous code.
Required methods
unsafe fn new() -> Self
[src]
fn req(self, req: Req) -> ReqRes
[src]
Makes a new request req
.
This method suspends execution of the current task allowing to escape from synchronous code.