Struct collectd_plugin::ValueListBuilder [−][src]
pub struct ValueListBuilder<'a> { /* fields omitted */ }Creates a value list to report values to collectd.
Methods
impl<'a> ValueListBuilder<'a>[src]
impl<'a> ValueListBuilder<'a>pub fn new<T: Into<&'a str>, U: Into<&'a str>>(
plugin: T,
type_: U
) -> ValueListBuilder<'a>[src]
pub fn new<T: Into<&'a str>, U: Into<&'a str>>(
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]
pub fn values(self, values: &'a [Value]) -> ValueListBuilder<'a>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]
pub fn plugin_instance<T: Into<&'a str>>(
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]
pub fn type_instance<T: Into<&'a str>>(
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]
pub fn host<T: Into<&'a str>>(self, host: T) -> ValueListBuilder<'a>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]
pub fn time(self, dt: DateTime<Utc>) -> ValueListBuilder<'a>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]
pub fn interval(self, interval: Duration) -> ValueListBuilder<'a>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<(), Error>[src]
pub fn submit(self) -> Result<(), Error>Submits the observed values to collectd and returns errors if encountered
Trait Implementations
impl<'a> Debug for ValueListBuilder<'a>[src]
impl<'a> Debug for ValueListBuilder<'a>fn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl<'a> PartialEq for ValueListBuilder<'a>[src]
impl<'a> PartialEq for ValueListBuilder<'a>fn eq(&self, other: &ValueListBuilder<'a>) -> bool[src]
fn eq(&self, other: &ValueListBuilder<'a>) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &ValueListBuilder<'a>) -> bool[src]
fn ne(&self, other: &ValueListBuilder<'a>) -> boolThis method tests for !=.
impl<'a> Clone for ValueListBuilder<'a>[src]
impl<'a> Clone for ValueListBuilder<'a>fn clone(&self) -> ValueListBuilder<'a>[src]
fn clone(&self) -> ValueListBuilder<'a>Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
Auto Trait Implementations
impl<'a> Send for ValueListBuilder<'a>
impl<'a> Send for ValueListBuilder<'a>impl<'a> Sync for ValueListBuilder<'a>
impl<'a> Sync for ValueListBuilder<'a>