pub trait TeamLifecycleHook: Send + Sync {
// Required method
fn name(&self) -> &str;
// Provided methods
fn priority(&self) -> i32 { ... }
fn before<'life0, 'life1, 'async_trait>(
&'life0 self,
_context: &'life1 TeamLifecycleContext,
) -> Pin<Box<dyn Future<Output = Result<TeamLifecycleDecision, AdkError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait { ... }
fn after<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_context: &'life1 TeamLifecycleContext,
_outcome: &'life2 TeamLifecycleOutcome,
) -> Pin<Box<dyn Future<Output = Result<(), AdkError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait { ... }
}Available on crate feature
agents only.Expand description
Async team execution hook.
Runner’s ordinary plugins still wrap the complete agent run. This hook adds the team-specific relationship boundary that generic plugins cannot infer.
Required Methods§
Provided Methods§
Sourcefn before<'life0, 'life1, 'async_trait>(
&'life0 self,
_context: &'life1 TeamLifecycleContext,
) -> Pin<Box<dyn Future<Output = Result<TeamLifecycleDecision, AdkError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn before<'life0, 'life1, 'async_trait>(
&'life0 self,
_context: &'life1 TeamLifecycleContext,
) -> Pin<Box<dyn Future<Output = Result<TeamLifecycleDecision, AdkError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Runs immediately before the described operation.
Sourcefn after<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_context: &'life1 TeamLifecycleContext,
_outcome: &'life2 TeamLifecycleOutcome,
) -> Pin<Box<dyn Future<Output = Result<(), AdkError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn after<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_context: &'life1 TeamLifecycleContext,
_outcome: &'life2 TeamLifecycleOutcome,
) -> Pin<Box<dyn Future<Output = Result<(), AdkError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Runs after success, failure, or policy termination.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".