Struct jsonrpc::Endpoint
[−]
[src]
pub struct Endpoint { /* fields omitted */ }
A JSON-RPC endpoint that can send requests (Client role), and send responses to requests (Server role).
This type has (mostly) handle semantics: it can be copied freely, used in multiple threads.
However, someone must be responsible for requesting an explicit shutdown of the Endpoint. If this is not done, the OutputAgent will panic once the last reference is dropped.
Methods
impl Endpoint
[src]
fn start_with(output_agent: OutputAgent) -> Endpoint
fn is_shutdown(&self) -> bool
fn request_shutdown(&self)
fn shutdown_and_join(&self)
fn next_id(&self) -> Id
impl Endpoint
[src]
fn send_request<PARAMS: Serialize, RET: Deserialize, RET_ERROR: Deserialize>(
&mut self,
method_name: &str,
params: PARAMS
) -> GResult<RequestFuture<RET, RET_ERROR>>
&mut self,
method_name: &str,
params: PARAMS
) -> GResult<RequestFuture<RET, RET_ERROR>>
Send a (non-notification) request
fn send_notification<PARAMS: Serialize>(
&self,
method_name: &str,
params: PARAMS
) -> GResult<()>
&self,
method_name: &str,
params: PARAMS
) -> GResult<()>
Send a notification
fn write_request<PARAMS: Serialize>(
&self,
id: Option<Id>,
method_name: &str,
params: PARAMS
) -> GResult<()>
&self,
id: Option<Id>,
method_name: &str,
params: PARAMS
) -> GResult<()>
fn handle_incoming_response(&mut self, response: Response)
Handle a well-formed incoming JsonRpc request object
Trait Implementations
impl Clone for Endpoint
[src]
fn clone(&self) -> Endpoint
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more