pub trait Plugin: Send + Sync {
// Required method
fn id(&self) -> &'static str;
// Provided methods
fn init<'life0, 'life1, 'async_trait>(
&'life0 self,
_prepared: &'life1 mut PreparedRequest,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait { ... }
fn hooks(&self) -> Hooks { ... }
}Expand description
Plugin extension point for better-fetch.
Required Methods§
Provided Methods§
fn init<'life0, 'life1, 'async_trait>(
&'life0 self,
_prepared: &'life1 mut PreparedRequest,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn hooks(&self) -> Hooks
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".