Struct jsonrpc::output_agent::OutputAgent
[−]
[src]
pub struct OutputAgent { /* fields omitted */ }
Actor-like, dedicated worker thread that handles writing to an output stream. Accepts tasks as messages, which are executed by the agent.
Note that the OutputAgent type is not meant to be Sync, it is meant to be synchronized externally, or more typically, used by one controlling thread only.
Methods
impl OutputAgent
[src]
fn start_with_provider<OUT, OUT_P>(msg_writer_provider: OUT_P) -> OutputAgent where OUT: MessageWriter + 'static, OUT_P: FnOnce() -> OUT + Send + 'static
fn start<AGENT_RUNNER>(agent_runner: AGENT_RUNNER) -> OutputAgent where AGENT_RUNNER: AgentRunnable, AGENT_RUNNER: Send + 'static
fn is_shutdown(&self) -> bool
fn try_submit_task(&self,
task: OutputAgentTask)
-> Result<(), SendError<OutputAgentMessage>>
task: OutputAgentTask)
-> Result<(), SendError<OutputAgentMessage>>