pub trait Handler<Q, R>:
Send
+ Sync
+ 'static {
// Required method
fn request(&self, from: &PeerId, req: Q) -> R;
// Provided method
fn seen(&self, _s: Sighting) { ... }
}Expand description
Answers requests from peers. The peer id is the one Noise authenticated.
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".