Add method to know endpoint path
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Alex 2022-02-16 13:00:26 +01:00
parent c20d36892b
commit dc0b5c0305
No known key found for this signature in database
GPG key ID: EDABF9711E244EB1
3 changed files with 7 additions and 2 deletions

2
Cargo.lock generated
View file

@ -398,7 +398,7 @@ dependencies = [
[[package]]
name = "netapp"
version = "0.3.0"
version = "0.3.1"
dependencies = [
"arc-swap",
"async-trait",

View file

@ -1,6 +1,6 @@
[package]
name = "netapp"
version = "0.3.0"
version = "0.3.1"
authors = ["Alex Auvolat <alex@adnab.me>"]
edition = "2018"
license-file = "LICENSE"

View file

@ -75,6 +75,11 @@ where
}
}
/// Get the path of this endpoint
pub fn path(&self) -> &str {
&self.path
}
/// Set the object that is responsible of handling requests to
/// this endpoint on the local node.
pub fn set_handler(&self, h: Arc<H>) {