pub trait Handle:
Typename
+ Debug
+ Send
+ Sync
+ Serialize {
// Required method
fn handle<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
src: Ipv4Addr,
) -> Pin<Box<dyn Future<Output = Result<Vec<Instruction>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Every object that has this trait must be convertible from a Vecpak Binary representation and must be able to handle itself as a message
Required Methods§
Sourcefn handle<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
src: Ipv4Addr,
) -> Pin<Box<dyn Future<Output = Result<Vec<Instruction>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
src: Ipv4Addr,
) -> Pin<Box<dyn Future<Output = Result<Vec<Instruction>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Handle a message returning instructions for upper layers
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".