Add a custom derive for NetworkBehaviour (#619)

* Add ProtocolsHandlerSelect

* Add a custom derive for NetworkBehaviour

* Remove 2018 edition

* More work

* Update the tests and work

* Allow ignored fields

* More fixes

* Give access to everything in the poll method
This commit is contained in:
Pierre Krieger
2018-11-12 17:12:47 +01:00
committed by GitHub
parent 7268a5ab13
commit 623728b35d
7 changed files with 700 additions and 9 deletions

View File

@ -137,6 +137,7 @@ pub extern crate multihash;
pub extern crate tokio_io;
pub extern crate tokio_codec;
extern crate libp2p_core_derive;
extern crate tokio_executor;
pub extern crate libp2p_core as core;
@ -163,6 +164,7 @@ mod transport_ext;
pub mod simple;
pub use libp2p_core_derive::NetworkBehaviour;
pub use self::core::{Transport, ConnectionUpgrade, PeerId};
pub use self::multiaddr::Multiaddr;
pub use self::simple::SimpleProtocol;