Skip to content

Commit f0590be

Browse files
authored
docs(iroh-net): Link to Endpoint in the first few paragraphs (#2875)
## Description The Endpoint is the central struct. I think it should be linked really early on as the most obvious link to follow. I myself rely on this link being at the start of docs page, but introducing this early example moved it down rather far. So move it back up. ## Breaking Changes <!-- Optional, if there are any breaking changes document them, including how to migrate older code. --> ## Notes & open questions <!-- Any notes, remarks or open questions you have to make about the PR. --> ## Change checklist - [x] Self-review. - [x] Documentation updates following the [style guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text), if relevant. - [x] Tests if relevant. - [x] All breaking changes documented.
1 parent a55529b commit f0590be

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

iroh-net/src/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
//! interface to [QUIC] connections and streams to the user, while implementing direct
55
//! connectivity using [hole punching] complemented by relay servers under the hood.
66
//!
7-
//! Connecting to a remote node looks roughly like this:
7+
//! An iroh-net node is created and controlled by the [`Endpoint`], e.g. connecting to
8+
//! another node:
89
//!
910
//! ```no_run
1011
//! # use iroh_net::{Endpoint, NodeAddr};
@@ -18,7 +19,7 @@
1819
//! # }
1920
//! ```
2021
//!
21-
//! The other side can accept incoming connections like this:
22+
//! The other node can accept incoming connections using the [`Endpoint`] as well:
2223
//!
2324
//! ```no_run
2425
//! # use iroh_net::{Endpoint, NodeAddr};

0 commit comments

Comments
 (0)