[−][src]Trait drone_core::proc_loop::Sess
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
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
Fiber that runs the command loop.
type Error: Send
Request error type.
Required methods
fn fib(&mut self) -> Pin<&mut Self::Fiber>
Returns a pinned mutable reference to the fiber.
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 + 'a>>
&mut self,
req: <Self::ProcLoop as ProcLoop>::Req
) -> Pin<Box<dyn Future<Output = Result<<Self::ProcLoop as ProcLoop>::ReqRes, Self::Error>> + Send + 'a>>
Returns a future that will return a result for the request req
.
Provided methods
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>>
&mut self,
cmd: <Self::ProcLoop as ProcLoop>::Cmd
) -> Pin<Box<dyn Future<Output = Result<<Self::ProcLoop as ProcLoop>::CmdRes, Self::Error>> + Send + 'a>>
Returns a future that will return a result for the command cmd
.