pub trait AutoModeSwitchHandler:
Send
+ Sync
+ 'static {
// Required method
fn handle<'life0, 'async_trait>(
&'life0 self,
session_id: SessionId,
error_code: Option<String>,
retry_after_seconds: Option<f64>,
) -> Pin<Box<dyn Future<Output = AutoModeSwitchResponse> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Handler for auto_mode_switch.requested events. When unset,
requestAutoModeSwitch: false goes on the wire.
Required Methods§
Sourcefn handle<'life0, 'async_trait>(
&'life0 self,
session_id: SessionId,
error_code: Option<String>,
retry_after_seconds: Option<f64>,
) -> Pin<Box<dyn Future<Output = AutoModeSwitchResponse> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn handle<'life0, 'async_trait>(
&'life0 self,
session_id: SessionId,
error_code: Option<String>,
retry_after_seconds: Option<f64>,
) -> Pin<Box<dyn Future<Output = AutoModeSwitchResponse> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Decide whether to fall back to the auto model after an eligible
rate-limit error. retry_after_seconds, when present, is the
number of seconds until the rate limit resets.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".