Skip to main content

AsyncNotificationManagerExt

Trait AsyncNotificationManagerExt 

Source
pub trait AsyncNotificationManagerExt: AsyncNotificationManager {
    // Provided methods
    fn validate_config(
        &self,
        config: &TaskPushNotificationConfig,
    ) -> Result<(), A2AError> { ... }
    fn set_validated<'life0, 'life1, 'async_trait>(
        &'life0 self,
        config: &'life1 TaskPushNotificationConfig,
    ) -> Pin<Box<dyn Future<Output = Result<TaskPushNotificationConfig, A2AError>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
}
Expand description

Validation conveniences over AsyncNotificationManager.

Blanket-implemented for every AsyncNotificationManager, so implementors only stub the core CRUD primitives.

Provided Methods§

Source

fn validate_config( &self, config: &TaskPushNotificationConfig, ) -> Result<(), A2AError>

Validate a push-notification config’s webhook URL.

Source

fn set_validated<'life0, 'life1, 'async_trait>( &'life0 self, config: &'life1 TaskPushNotificationConfig, ) -> Pin<Box<dyn Future<Output = Result<TaskPushNotificationConfig, A2AError>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Validate the task ID and webhook URL, then store the config.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§