[][src]Trait drone_core::proc_loop::Context

pub trait Context<Req, ReqRes>: Copy + 'static {
    pub unsafe fn new() -> Self;
pub fn req(self, req: Req) -> ReqRes; }

A token that allows suspending synchronous code.

Required methods

pub unsafe fn new() -> Self[src]

Creates a new token.

Safety

It is unsafe to create a token inside an inappropriate context.

pub 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.

Loading content...

Implementors

Loading content...