Skip to content

Commit

Permalink
chore(docs): add a doc comment to explain the router wrapper (#680)
Browse files Browse the repository at this point in the history
Add a doc comment to explain the router wrapper
  • Loading branch information
DaughterOfMars committed Sep 14, 2022
1 parent e15164b commit f28baeb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/bin/inx-chronicle/api/router.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
// Copyright 2022 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

//! This `Router` wraps the functionality we use from [`axum::Router`] and tracks the string routes
//! as they are added in a tree node structure. The reason for this ugliness is to provide a routes
//! endpoint which can output a list of unique routes at any depth level. The most critical part of
//! this is the [`Router::into_make_service()`] function, which adds an [`Extension`] containing the
//! root [`RouteNode`]. These routes can also be filtered using a [`RegexSet`] to allow the exclusion
//! of unauthorized routes.

use std::{
collections::{BTreeMap, BTreeSet},
convert::Infallible,
Expand Down

0 comments on commit f28baeb

Please sign in to comment.