mirror of
https://github.com/fafhrd91/actix-web
synced 2025-08-30 16:40:21 +02:00
extrat elements of path pattern
This commit is contained in:
@@ -59,6 +59,10 @@ impl<S> Resource<S> where S: 'static {
|
||||
self.name = name.into();
|
||||
}
|
||||
|
||||
pub(crate) fn get_name(&self) -> Option<String> {
|
||||
if self.name.is_empty() { None } else { Some(self.name.clone()) }
|
||||
}
|
||||
|
||||
/// Register a new route and return mutable reference to *Route* object.
|
||||
/// *Route* is used for route configuration, i.e. adding predicates, setting up handler.
|
||||
///
|
||||
|
Reference in New Issue
Block a user