Struct fibers_http_server::metrics::WithMetrics
[−]
[src]
pub struct WithMetrics<H> { /* fields omitted */ }
A handler for granting the metrics collection functionality to the inner handler H
.
Methods
impl<H: HandleRequest> WithMetrics<H>
[src]
pub fn new(inner: H) -> Self
[src]
Makes a new WithMetrics
instance.
pub fn with_metrics(inner: H, metric_builder: MetricBuilder) -> Self
[src]
Makes a new WithMetrics
instance with the given MetricBuilder
.
pub fn metrics(&self) -> &HandlerMetrics
[src]
Returns the metrics of the handler.
Trait Implementations
impl<H: Debug> Debug for WithMetrics<H>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<H: HandleRequest> HandleRequest for WithMetrics<H>
[src]
const METHOD: &'static str
METHOD: &'static str = <H>::METHOD
The method that the handler can handle.
const PATH: &'static str
PATH: &'static str = <H>::PATH
The request path that the handler can handle. Read more
type ReqBody = H::ReqBody
The type of the request bodies.
type ResBody = H::ResBody
The type of the response bodies.
type Decoder = H::Decoder
Request body decoder.
type Encoder = H::Encoder
Response body encoder.
type Reply = Time<H>
Future
that represents reply to a request.
fn handle_request(&self, req: Req<Self::ReqBody>) -> Self::Reply
[src]
Handles a request.
fn handle_request_head(&self, req: &Req<()>) -> Option<Res<Self::ResBody>>
[src]
Handles the head part of a request. Read more
fn handle_decoding_error(
&self,
req: Req<()>,
error: &Error
) -> Option<Res<Self::ResBody>>
[src]
&self,
req: Req<()>,
error: &Error
) -> Option<Res<Self::ResBody>>
Handles an error occurred while decoding the body of a request. Read more
Auto Trait Implementations
impl<H> Send for WithMetrics<H> where
H: Send,
H: Send,
impl<H> Sync for WithMetrics<H> where
H: Sync,
H: Sync,