Skip to content

Commit

Permalink
docs(iroh-net): Update endpoint docs (#2334)
Browse files Browse the repository at this point in the history
## Description

This rewrites quite a bit of the docs aiming to be more consistent and
clearly describe the various parts of the API and how they interact.

It also tries to get the style standardised following
https://github.com/rust-lang/rfcs/blob/master/text/1574-more-api-documentation-conventions.md#appendix-a-full-conventions-text

The order of the functions has been deliberately changed, the order is
used by rust doc as well so directly affects how users see the
documentation.

Some `PublicKey` types have been changed into `NodeId`.  They mostly
already had `node_id` as parameter names and were described as such.
But no other code changes have been made.


## Breaking Changes

<!-- Optional, if there are any breaking changes document them,
including how to migrate older code. -->

## Notes & open questions

The sorting makes the diff rather difficult to read, sorry about that.
But
maybe that's not so bad for the doc comments as the result is more
important
than the diff.

I've taken to calling the logical thing the `Endpoint` controls an
"iroh-net node". This is the thing that goes into the `NodeMap` etc, so
is consistent with naming. But I'm usually using "iroh-net node" in
prose to distinguish it from the `iroh::node::Node`.

## Change checklist

- [x] Self-review.
- [x] Documentation updates if relevant.
- ~~[ ] Tests if relevant.~~
- ~~[ ] All breaking changes documented.~~

---------

Co-authored-by: Divma <26765164+divagant-martian@users.noreply.github.com>
  • Loading branch information
flub and divagant-martian committed Jun 7, 2024
1 parent 7198cd0 commit 8d91b10
Showing 1 changed file with 506 additions and 366 deletions.
Loading

0 comments on commit 8d91b10

Please sign in to comment.