[][src]Struct metrics_exporter_http::HttpExporter

pub struct HttpExporter<C, B> { /* fields omitted */ }

Exports metrics over HTTP.

Methods

impl<C, B> HttpExporter<C, B> where
    C: Observe + Send + Sync + 'static,
    B: Builder + Send + Sync + 'static,
    B::Output: Drain<String> + Observer
[src]

pub fn new(controller: C, builder: B, address: SocketAddr) -> Self[src]

Creates a new HttpExporter that listens on the given address.

Observers expose their output by being converted into strings.

pub async fn async_run(self) -> Result<()>[src]

Starts an HTTP server on the address the exporter was originally configured with, responding to any request with the output of the configured observer.

Auto Trait Implementations

impl<C, B> RefUnwindSafe for HttpExporter<C, B> where
    B: RefUnwindSafe,
    C: RefUnwindSafe

impl<C, B> Send for HttpExporter<C, B> where
    B: Send,
    C: Send

impl<C, B> Sync for HttpExporter<C, B> where
    B: Sync,
    C: Sync

impl<C, B> Unpin for HttpExporter<C, B> where
    B: Unpin,
    C: Unpin

impl<C, B> UnwindSafe for HttpExporter<C, B> where
    B: UnwindSafe,
    C: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.