Trait EndpointMetadata

Source
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§

Source

fn method(&self) -> Method

The endpoint’s HTTP method.

Source

fn path(&self) -> &[PathSegment]

The endpoint’s parsed HTTP URI path.

Each value in the slice represents one segment of the URI.

Source

fn template(&self) -> &str

The endpoint’s raw HTTP URI template.

Use the Self::path() method for routing rather than parsing this string.

Source

fn service_name(&self) -> &str

The name of the service defining this endpoint.

Source

fn name(&self) -> &str

The name of the endpoint.

Source

fn deprecated(&self) -> Option<&str>

If the endpoint is deprecated, returns the deprecation documentation.

Implementations on Foreign Types§

Source§

impl<T> EndpointMetadata for Box<T>
where T: ?Sized + EndpointMetadata,

Source§

fn method(&self) -> Method

Source§

fn path(&self) -> &[PathSegment]

Source§

fn template(&self) -> &str

Source§

fn service_name(&self) -> &str

Source§

fn name(&self) -> &str

Source§

fn deprecated(&self) -> Option<&str>

Implementors§