Skip to content

Commit

Permalink
add doc comment
Browse files Browse the repository at this point in the history
  • Loading branch information
gbj committed Nov 22, 2024
1 parent d493baf commit 1d93aee
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions router/src/matching/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,10 @@ where
pub struct RouteMatchId(pub(crate) u16);

impl RouteMatchId {
/// Creates a new match ID based on the current route ID used in nested route generation.
///
/// In general, you do not need this; it should only be used for custom route matching behavior
/// in a library that creates its own route types.
pub fn new_from_route_id() -> RouteMatchId {
RouteMatchId(ROUTE_ID.fetch_add(1, Ordering::Relaxed))
}
Expand Down

0 comments on commit 1d93aee

Please sign in to comment.