pub trait EndpointMetadata {
// Required methods
fn method(&self) -> Method;
fn path(&self) -> &[PathSegment];
fn template(&self) -> &str;
fn service_name(&self) -> &str;
fn name(&self) -> &str;
fn deprecated(&self) -> Option<&str>;
}
Expand description
Metadata about an HTTP endpoint.
Required Methods§
Sourcefn path(&self) -> &[PathSegment]
fn path(&self) -> &[PathSegment]
The endpoint’s parsed HTTP URI path.
Each value in the slice represents one segment of the URI.
Sourcefn template(&self) -> &str
fn template(&self) -> &str
The endpoint’s raw HTTP URI template.
Use the Self::path()
method for routing rather than parsing this string.
Sourcefn service_name(&self) -> &str
fn service_name(&self) -> &str
The name of the service defining this endpoint.
Sourcefn deprecated(&self) -> Option<&str>
fn deprecated(&self) -> Option<&str>
If the endpoint is deprecated, returns the deprecation documentation.