forked from lx/netapp
Update documentation
This commit is contained in:
parent
5d07711900
commit
9e38b82edc
2 changed files with 3 additions and 1 deletions
|
@ -6,7 +6,7 @@
|
||||||
//! - peer discovery
|
//! - peer discovery
|
||||||
//! - query/response message passing model for communications
|
//! - query/response message passing model for communications
|
||||||
//! - multiplexing transfers over a connection
|
//! - multiplexing transfers over a connection
|
||||||
//! - overlay networks: full mesh or random peer sampling using Basalt
|
//! - overlay networks: full mesh, and soon other methods
|
||||||
//!
|
//!
|
||||||
//! Of particular interest, read the documentation for the `netapp::NetApp` type,
|
//! Of particular interest, read the documentation for the `netapp::NetApp` type,
|
||||||
//! the `message::Message` trait, and `proto::RequestPriority` to learn more
|
//! the `message::Message` trait, and `proto::RequestPriority` to learn more
|
||||||
|
|
|
@ -158,6 +158,8 @@ impl NetApp {
|
||||||
|
|
||||||
/// Add a handler for a certain message type. Note that only one handler
|
/// Add a handler for a certain message type. Note that only one handler
|
||||||
/// can be specified for each message type.
|
/// can be specified for each message type.
|
||||||
|
/// The handler is an asynchronous function, i.e. a function that returns
|
||||||
|
/// a future.
|
||||||
pub fn add_msg_handler<M, F, R>(&self, handler: F)
|
pub fn add_msg_handler<M, F, R>(&self, handler: F)
|
||||||
where
|
where
|
||||||
M: Message + 'static,
|
M: Message + 'static,
|
||||||
|
|
Loading…
Reference in a new issue