Better documentation (#391)

* Better documentation

* Minor
This commit is contained in:
Pierre Krieger
2018-08-22 10:46:23 +02:00
committed by Benjamin Kampmann
parent 7aa08917ea
commit c77b1f5a0a
26 changed files with 127 additions and 816 deletions

View File

@ -18,9 +18,6 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
// TODO: use this once stable ; for now we just copy-paste the content of the README.md
//#![doc(include = "../README.md")]
//! Transport, protocol upgrade and swarm systems of *libp2p*.
//!
//! This crate contains all the core traits and mechanisms of the transport and swarm systems

View File

@ -116,7 +116,7 @@ pub trait Transport {
/// implementation of `Transport` is only responsible for handling the protocols it supports.
///
/// Returns `None` if nothing can be determined. This happens if this trait implementation
/// doesn't recognize the protocols, or if `server` and `observed` are related.
/// doesn't recognize the protocols, or if `server` and `observed` are unrelated.
fn nat_traversal(&self, server: &Multiaddr, observed: &Multiaddr) -> Option<Multiaddr>;
/// Applies a function on the output of the `Transport`.