[][src]Struct libhoney::Builder

pub struct Builder {
    pub options: Options,
    // some fields omitted
}

Builder is used to create templates for new events, specifying default fields and override settings.

Fields

options: Options

Client Options

Implementations

impl Builder[src]

pub fn new(options: Options) -> Self[src]

Creates a new event Builder with emtpy Static or Dynamic fields.

pub fn add_dynamic_field(&mut self, name: &str, func: DynamicFieldFunc)[src]

add_dynamic_field adds a dynamic field to the builder. Any events created from this builder will get this metric added.

pub fn new_event(&self) -> Event[src]

new_event creates a new Event prepopulated with fields, dynamic field values, and configuration inherited from the builder.

Trait Implementations

impl Clone for Builder[src]

impl Debug for Builder[src]

impl FieldHolder for Builder[src]

pub fn add_field(&mut self, name: &str, value: Value)[src]

add_field adds a field to the current (event/builder) fields

pub fn add_func<F>(&mut self, func: F) where
    F: Fn() -> Result<(String, Value)>, 
[src]

add_func iterates over the results from func (until Err) and adds the results to the event/builder fields

Auto Trait Implementations

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> Instrument for T[src]

impl<T> Instrument for T[src]

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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<V, T> VZip<V> for T where
    V: MultiLane<T>,