pub trait Delegator: Send + Sync {
// Required methods
fn delegate<'life0, 'async_trait>(
&'life0 self,
req: DelegateRequest,
) -> Pin<Box<dyn Future<Output = Result<Delegated, DelegateError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn stop_member<'life0, 'life1, 'async_trait>(
&'life0 self,
seat: &'life1 TeamSeat,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn live_members(&self) -> Vec<LiveMember>;
// Provided method
fn check_agent_type(&self, _name: &str) -> Result<(), DelegateError> { ... }
}Required Methods§
fn delegate<'life0, 'async_trait>(
&'life0 self,
req: DelegateRequest,
) -> Pin<Box<dyn Future<Output = Result<Delegated, DelegateError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn stop_member<'life0, 'life1, 'async_trait>(
&'life0 self,
seat: &'life1 TeamSeat,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn stop_member<'life0, 'life1, 'async_trait>(
&'life0 self,
seat: &'life1 TeamSeat,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Stop a persistent member; nothing when there is no such member.
Sourcefn live_members(&self) -> Vec<LiveMember>
fn live_members(&self) -> Vec<LiveMember>
The persistent members alive, sorted by id. They run under the engine that holds this delegator and stop with it.
Provided Methods§
Sourcefn check_agent_type(&self, _name: &str) -> Result<(), DelegateError>
fn check_agent_type(&self, _name: &str) -> Result<(), DelegateError>
Err, naming the types there are, when a request naming name would be refused for it.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".