pub struct Prometheus { /* private fields */ }Expand description
Tide middleware for prometheus with a few default metrics.
Implementations§
Source§impl Prometheus
impl Prometheus
Sourcepub fn new(prefix: &str) -> Self
pub fn new(prefix: &str) -> Self
Creates a new Prometheus middleware. This also creates and registers the
metrics in the prometheus::default_registry.
Trait Implementations§
Source§impl Clone for Prometheus
impl Clone for Prometheus
Source§fn clone(&self) -> Prometheus
fn clone(&self) -> Prometheus
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Prometheus
impl Debug for Prometheus
Source§impl<State: Clone + Send + Sync + 'static> Middleware<State> for Prometheus
impl<State: Clone + Send + Sync + 'static> Middleware<State> for Prometheus
Source§fn handle<'life0, 'life1, 'async_trait>(
&'life0 self,
request: Request<State>,
next: Next<'life1, State>,
) -> Pin<Box<dyn Future<Output = Result> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle<'life0, 'life1, 'async_trait>(
&'life0 self,
request: Request<State>,
next: Next<'life1, State>,
) -> Pin<Box<dyn Future<Output = Result> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Asynchronously handle the request, and return a response.
Auto Trait Implementations§
impl Freeze for Prometheus
impl !RefUnwindSafe for Prometheus
impl Send for Prometheus
impl Sync for Prometheus
impl Unpin for Prometheus
impl !UnwindSafe for Prometheus
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more