pub struct ProcessTransport { /* private fields */ }Expand description
Supervises one plugin process.
Implementations§
Source§impl ProcessTransport
impl ProcessTransport
pub fn new(plugin: LoadedManifest, runtime: ProcessRuntime) -> Self
Sourcepub fn stderr_tail(&self) -> String
pub fn stderr_tail(&self) -> String
The last bytes the plugin wrote to stderr.
Sourcepub async fn recent_logs(&self) -> Vec<String>
pub async fn recent_logs(&self) -> Vec<String>
Recent log notifications of the running process.
Trait Implementations§
Source§impl Debug for ProcessTransport
impl Debug for ProcessTransport
Source§impl Transport for ProcessTransport
impl Transport for ProcessTransport
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 ProcessTransport
impl !RefUnwindSafe for ProcessTransport
impl !UnwindSafe for ProcessTransport
impl Forget for ProcessTransport
impl Move for ProcessTransport
impl Send for ProcessTransport
impl Sync for ProcessTransport
impl Unpin for ProcessTransport
impl UnsafeUnpin for ProcessTransport
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