pub struct IoTransport { /* private fields */ }Expand description
A transport over an already-connected byte stream, e.g. an in-process plugin or a socket. The connection is initialized on first use.
Implementations§
Trait Implementations§
Source§impl Debug for IoTransport
impl Debug for IoTransport
Source§impl Transport for IoTransport
impl Transport for IoTransport
Source§fn call<'a>(
&'a self,
id: String,
method: &'a str,
params: Value,
sink: Option<NotifySink>,
cancel_on_drop: bool,
clock: &'a Arc<dyn Clock>,
) -> BoxFuture<'a, Result<Value, CallError>>
fn call<'a>( &'a self, id: String, method: &'a str, params: Value, sink: Option<NotifySink>, cancel_on_drop: bool, clock: &'a Arc<dyn Clock>, ) -> BoxFuture<'a, Result<Value, CallError>>
Send request
id and wait for the response. Notifications carrying
request_id == id are passed to sink. Dropping the future abandons the
request (and cancels it when cancel_on_drop is set).Source§fn initialize<'a>(
&'a self,
clock: &'a Arc<dyn Clock>,
) -> BoxFuture<'a, Result<Value, CallError>>
fn initialize<'a>( &'a self, clock: &'a Arc<dyn Clock>, ) -> BoxFuture<'a, Result<Value, CallError>>
Run the
initialize handshake (starting the plugin if needed) and return its result.Source§fn note_timeout(&self)
fn note_timeout(&self)
A request was abandoned after its timeout. Transports supervising a process
use this to restart a plugin that stopped answering. Default: no-op.
Source§fn note_answer(&self)
fn note_answer(&self)
A request completed (successfully or with a plugin error). Default: no-op.
Auto Trait Implementations§
impl !Freeze for IoTransport
impl !RefUnwindSafe for IoTransport
impl !UnwindSafe for IoTransport
impl Forget for IoTransport
impl Move for IoTransport
impl Send for IoTransport
impl Sync for IoTransport
impl Unpin for IoTransport
impl UnsafeUnpin for IoTransport
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more