Trait conjure_http::server::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§

source§

impl<'a, I, O> EndpointMetadata for BoxAsyncEndpoint<'a, I, O>