[][src]Trait drone_core::proc_loop::Sess

pub trait Sess: Send {
    type ProcLoop: ProcLoop;
    type Fiber: Fiber<Input = In<<Self::ProcLoop as ProcLoop>::Cmd, <Self::ProcLoop as ProcLoop>::ReqRes>, Yield = Out<<Self::ProcLoop as ProcLoop>::Req, <Self::ProcLoop as ProcLoop>::CmdRes>, Return = !> + Send;
    type Error: Send;
    pub fn fib(&mut self) -> Pin<&mut Self::Fiber>;
pub fn run_req(
        &mut self,
        req: <Self::ProcLoop as ProcLoop>::Req
    ) -> Pin<Box<dyn Future<Output = Result<<Self::ProcLoop as ProcLoop>::ReqRes, Self::Error>> + Send + '_>>; pub fn cmd(
        &mut self,
        cmd: <Self::ProcLoop as ProcLoop>::Cmd
    ) -> Pin<Box<dyn Future<Output = Result<<Self::ProcLoop as ProcLoop>::CmdRes, Self::Error>> + Send + '_>> { ... } }

A session type for the synchronous command loop ProcLoop.

A type that implements this trait should wrap the fiber for the command loop.

Associated Types

type ProcLoop: ProcLoop[src]

The command loop interface.

type Fiber: Fiber<Input = In<<Self::ProcLoop as ProcLoop>::Cmd, <Self::ProcLoop as ProcLoop>::ReqRes>, Yield = Out<<Self::ProcLoop as ProcLoop>::Req, <Self::ProcLoop as ProcLoop>::CmdRes>, Return = !> + Send[src]

Fiber that runs the command loop.

type Error: Send[src]

Request error type.

Loading content...

Required methods

pub fn fib(&mut self) -> Pin<&mut Self::Fiber>[src]

Returns a pinned mutable reference to the fiber.

pub fn run_req(
    &mut self,
    req: <Self::ProcLoop as ProcLoop>::Req
) -> Pin<Box<dyn Future<Output = Result<<Self::ProcLoop as ProcLoop>::ReqRes, Self::Error>> + Send + '_>>
[src]

Returns a future that will return a result for the request req.

Loading content...

Provided methods

pub fn cmd(
    &mut self,
    cmd: <Self::ProcLoop as ProcLoop>::Cmd
) -> Pin<Box<dyn Future<Output = Result<<Self::ProcLoop as ProcLoop>::CmdRes, Self::Error>> + Send + '_>>
[src]

Returns a future that will return a result for the command cmd.

Loading content...

Implementors

Loading content...