[][src]Struct collectd_plugin::ValueListBuilder

pub struct ValueListBuilder<'a> { /* fields omitted */ }

Creates a value list to report values to collectd.

Methods

impl<'a> ValueListBuilder<'a>[src]

pub fn new<T: Into<&'a str>, U: Into<&'a str>>(
    plugin: T,
    type_: U
) -> ValueListBuilder<'a>
[src]

Primes a value list for submission. plugin will most likely be the name from the PluginManager and type_ is the datatype found in types.db

pub fn values(self, values: &'a [Value]) -> ValueListBuilder<'a>[src]

A set of observed values that belong to the same plugin and type instance

pub fn plugin_instance<T: Into<&'a str>>(
    self,
    plugin_instance: T
) -> ValueListBuilder<'a>
[src]

Distinguishes entities that yield metrics. Each core would be a different instance of the same plugin, as each core reports "idle", "user", "system" metrics.

pub fn type_instance<T: Into<&'a str>>(
    self,
    type_instance: T
) -> ValueListBuilder<'a>
[src]

The type instance is used to separate values of identical type which nonetheless belong to one another. For instance, even though "free", "used", and "total" all have types of "Memory" they are different type instances.

pub fn host<T: Into<&'a str>>(self, host: T) -> ValueListBuilder<'a>[src]

Override the machine's hostname that the observed values will be attributed to. Best to override when observing values from another machine

pub fn time(self, dt: DateTime<Utc>) -> ValueListBuilder<'a>[src]

The timestamp at which the value was collected. Overrides the default time, which is when collectd receives the values from submit. Use only if there is a significant delay is metrics gathering or if submitting values from the past.

pub fn interval(self, interval: Duration) -> ValueListBuilder<'a>[src]

The interval in which new values are to be expected. This is typically handled at a global or plugin level. Use at your own discretion.

pub fn submit(self) -> Result<(), SubmitError>[src]

Submits the observed values to collectd and returns errors if encountered

Trait Implementations

impl<'a> Clone for ValueListBuilder<'a>[src]

impl<'a> Debug for ValueListBuilder<'a>[src]

impl<'a> PartialEq<ValueListBuilder<'a>> for ValueListBuilder<'a>[src]

impl<'a> StructuralPartialEq for ValueListBuilder<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for ValueListBuilder<'a>

impl<'a> Send for ValueListBuilder<'a>

impl<'a> Sync for ValueListBuilder<'a>

impl<'a> Unpin for ValueListBuilder<'a>

impl<'a> UnwindSafe for ValueListBuilder<'a>

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> 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.