pub struct RouteRegistry { /* private fields */ }
Expand description
Route registry for managing routes across different protocols
Implementations§
Source§impl RouteRegistry
impl RouteRegistry
Sourcepub fn add_http_route(&mut self, route: Route) -> Result<()>
pub fn add_http_route(&mut self, route: Route) -> Result<()>
Add an HTTP route
Sourcepub fn add_ws_route(&mut self, route: Route) -> Result<()>
pub fn add_ws_route(&mut self, route: Route) -> Result<()>
Add a WebSocket route
Sourcepub fn add_route(&mut self, route: Route) -> Result<()>
pub fn add_route(&mut self, route: Route) -> Result<()>
Add a generic route (alias for add_http_route)
Sourcepub fn find_http_routes(&self, method: &HttpMethod, path: &str) -> Vec<&Route>
pub fn find_http_routes(&self, method: &HttpMethod, path: &str) -> Vec<&Route>
Find matching HTTP routes
Sourcepub fn find_ws_routes(&self, path: &str) -> Vec<&Route>
pub fn find_ws_routes(&self, path: &str) -> Vec<&Route>
Find matching WebSocket routes
Sourcepub fn find_grpc_routes(&self, service: &str, method: &str) -> Vec<&Route>
pub fn find_grpc_routes(&self, service: &str, method: &str) -> Vec<&Route>
Find matching gRPC routes
Sourcepub fn get_http_routes(&self, method: &HttpMethod) -> Vec<&Route>
pub fn get_http_routes(&self, method: &HttpMethod) -> Vec<&Route>
Get all HTTP routes for a method
Sourcepub fn get_ws_routes(&self) -> Vec<&Route>
pub fn get_ws_routes(&self) -> Vec<&Route>
Get all WebSocket routes
Sourcepub fn get_grpc_routes(&self, service: &str) -> Vec<&Route>
pub fn get_grpc_routes(&self, service: &str) -> Vec<&Route>
Get all gRPC routes for a service
Trait Implementations§
Source§impl Clone for RouteRegistry
impl Clone for RouteRegistry
Source§fn clone(&self) -> RouteRegistry
fn clone(&self) -> RouteRegistry
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for RouteRegistry
impl Debug for RouteRegistry
Auto Trait Implementations§
impl Freeze for RouteRegistry
impl RefUnwindSafe for RouteRegistry
impl Send for RouteRegistry
impl Sync for RouteRegistry
impl Unpin for RouteRegistry
impl UnwindSafe for RouteRegistry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more