rlibdht 0.1.0

Rust DHT library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crate::rpc::events::error_response_event::ErrorResponseEvent;
use crate::rpc::events::response_event::ResponseEvent;
use crate::rpc::events::stalled_event::StalledEvent;

pub trait ResponseCallback: Send {

    fn on_response(&self, event: ResponseEvent);

    fn on_error_response(&self, _event: ErrorResponseEvent) {
    }

    fn on_stalled(&self, _event: StalledEvent) {
    }
}