pub trait ExtensionClient<E: Extension>: PollClient {
// Required method
fn id() -> u8;
// Provided method
fn extension<Rq, Rp>(
&mut self,
request: Rq,
) -> ExtensionResult<'_, E, Rp, Self>
where Rq: Into<E::Request>,
Rp: TryFrom<E::Reply, Error = Error> { ... }
}Available on crate feature
serde-extensions only.Expand description
Executes extension requests.
Instead of using this trait directly, extensions should define their own traits that extend
this trait and use the extension function to execute extension requests.
Required Methods§
Provided Methods§
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.