[][src]Struct metrics_runtime::exporters::HttpExporter

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

Exports metrics over HTTP.

Methods

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

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

Creates a new HttpExporter that listens on the given address.

Observers expose their output by being converted into strings.

pub fn run(self)[src]

Run the exporter on the current thread.

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

pub fn into_future(self) -> impl Future<Item = (), Error = ()>[src]

Converts this exporter into a future which can be driven externally.

This 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> Sync for HttpExporter<C, B> where
    B: Sync,
    C: Sync

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

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

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

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

Blanket Implementations

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.

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

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Erased for T