pub trait PluggableTransport: PluggableTransportPrivate {
// Required method
fn transport_methods(&self) -> &HashMap<PtTransportName, PtClientMethod>;
// Provided method
fn next_message<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<PtMessage>> + Send + 'async_trait>>
where Self: Send + 'async_trait,
'life0: 'async_trait { ... }
}
Available on crate feature
managed-pts
only.Expand description
Common functionality implemented to allow code reuse
Required Methods§
Sourcefn transport_methods(&self) -> &HashMap<PtTransportName, PtClientMethod>
fn transport_methods(&self) -> &HashMap<PtTransportName, PtClientMethod>
Get all client methods returned by the binary, if it has been launched.
If it hasn’t been launched, the returned map will be empty.
Provided Methods§
Sourcefn next_message<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<PtMessage>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
fn next_message<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<PtMessage>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
Get the next PtMessage
from the running transport. It is recommended to call this
in a loop once a PT has been launched, in order to forward log messages and find out about
status updates.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.