pub struct RetryPlugin { /* private fields */ }
Expand description
Plugin for automatic retry with exponential backoff
Implementations§
Source§impl RetryPlugin
impl RetryPlugin
Sourcepub fn new(config: PluginConfig) -> Self
pub fn new(config: PluginConfig) -> Self
Create a new retry plugin
Trait Implementations§
Source§impl ClientPlugin for RetryPlugin
impl ClientPlugin for RetryPlugin
Source§fn description(&self) -> Option<&str>
fn description(&self) -> Option<&str>
Optional plugin description
Source§fn initialize<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 PluginContext,
) -> Pin<Box<dyn Future<Output = PluginResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn initialize<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 PluginContext,
) -> Pin<Box<dyn Future<Output = PluginResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Initialize the plugin Read more
Source§fn before_request<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 mut RequestContext,
) -> Pin<Box<dyn Future<Output = PluginResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn before_request<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 mut RequestContext,
) -> Pin<Box<dyn Future<Output = PluginResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Hook called before sending a request to the server Read more
Source§fn after_response<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 mut ResponseContext,
) -> Pin<Box<dyn Future<Output = PluginResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn after_response<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 mut ResponseContext,
) -> Pin<Box<dyn Future<Output = PluginResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Hook called after receiving a response from the server Read more
Source§fn handle_custom<'life0, 'life1, 'async_trait>(
&'life0 self,
method: &'life1 str,
_params: Option<Value>,
) -> Pin<Box<dyn Future<Output = PluginResult<Option<Value>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle_custom<'life0, 'life1, 'async_trait>(
&'life0 self,
method: &'life1 str,
_params: Option<Value>,
) -> Pin<Box<dyn Future<Output = PluginResult<Option<Value>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Handle custom methods not part of the standard MCP protocol Read more
Source§fn dependencies(&self) -> Vec<&str>
fn dependencies(&self) -> Vec<&str>
Plugin dependencies (other plugins that must be registered first)
Auto Trait Implementations§
impl Freeze for RetryPlugin
impl RefUnwindSafe for RetryPlugin
impl Send for RetryPlugin
impl Sync for RetryPlugin
impl Unpin for RetryPlugin
impl UnwindSafe for RetryPlugin
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