pub trait PushConfigStore:
Send
+ Sync
+ 'static {
// Required methods
fn set<'a>(
&'a self,
config: TaskPushNotificationConfig,
) -> Pin<Box<dyn Future<Output = Result<TaskPushNotificationConfig, A2aError>> + Send + 'a>>;
fn get<'a>(
&'a self,
task_id: &'a str,
id: &'a str,
) -> Pin<Box<dyn Future<Output = Result<Option<TaskPushNotificationConfig>, A2aError>> + Send + 'a>>;
fn list<'a>(
&'a self,
task_id: &'a str,
) -> Pin<Box<dyn Future<Output = Result<Vec<TaskPushNotificationConfig>, A2aError>> + Send + 'a>>;
fn delete<'a>(
&'a self,
task_id: &'a str,
id: &'a str,
) -> Pin<Box<dyn Future<Output = Result<(), A2aError>> + Send + 'a>>;
}Expand description
Trait for storing push notification configurations.
Object-safe; used as Box<dyn PushConfigStore>.
Required Methods§
Sourcefn set<'a>(
&'a self,
config: TaskPushNotificationConfig,
) -> Pin<Box<dyn Future<Output = Result<TaskPushNotificationConfig, A2aError>> + Send + 'a>>
fn set<'a>( &'a self, config: TaskPushNotificationConfig, ) -> Pin<Box<dyn Future<Output = Result<TaskPushNotificationConfig, A2aError>> + Send + 'a>>
Sourcefn get<'a>(
&'a self,
task_id: &'a str,
id: &'a str,
) -> Pin<Box<dyn Future<Output = Result<Option<TaskPushNotificationConfig>, A2aError>> + Send + 'a>>
fn get<'a>( &'a self, task_id: &'a str, id: &'a str, ) -> Pin<Box<dyn Future<Output = Result<Option<TaskPushNotificationConfig>, A2aError>> + Send + 'a>>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".