[−][src]Struct collectd_plugin::ValueListBuilder
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]
plugin: T,
type_: U
) -> ValueListBuilder<'a>
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]
self,
plugin_instance: T
) -> ValueListBuilder<'a>
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]
self,
type_instance: T
) -> ValueListBuilder<'a>
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]
fn clone(&self) -> ValueListBuilder<'a>[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
impl<'a> Debug for ValueListBuilder<'a>[src]
impl<'a> PartialEq<ValueListBuilder<'a>> for ValueListBuilder<'a>[src]
fn eq(&self, other: &ValueListBuilder<'a>) -> bool[src]
fn ne(&self, other: &ValueListBuilder<'a>) -> bool[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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,