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 12, 2024
1 parent 0c281a6 commit f9eb78d
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 @@ -95,7 +95,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 f9eb78d

Please sign in to comment.