[−][src]Struct metrix::instruments::polled::PollingInstrument
Create an instrument that delivers metrics based on querying values
when a Snapshot is requested.
The Snapshot can be generated from anything that
implements PutsSnapshot.
Fields
name: StringIf create_group_with_name is true, this name will create a new named
group.
title: Option<String>description: Option<String>poll: Pcreate_group_with_name: boolMethods
impl<P> PollingInstrument<P> where
P: PutsSnapshot, [src]
P: PutsSnapshot,
pub fn new_with_defaults<T: Into<String>>(
name: T,
poll: P
) -> PollingInstrument<P>[src]
name: T,
poll: P
) -> PollingInstrument<P>
pub fn get_name(&self) -> &str[src]
Gets the name of this PollingInstrument
pub fn set_name<T: Into<String>>(&mut self, name: T)[src]
Set the name if this PollingInstrument.
The name is a path segment within a Snapshot if
self.create_group_with_name is set to true.
pub fn create_group_with_name(&self) -> bool[src]
Returns whether a new group with the instruments name shall be craeted in the snapshot.
pub fn set_create_group_with_name(&mut self, create_group: bool)[src]
Set to true if you want to create a new group
with the name of this instrument when a Snapshot
is requested.
pub fn set_title<T: Into<String>>(&mut self, title: T)[src]
Sets the title of this PollingInstrument.
A title can be part of a descriptive Snapshot
pub fn set_description<T: Into<String>>(&mut self, description: T)[src]
Sets the description of this PollingInstrument.
A description can be part of a descriptive Snapshot
Trait Implementations
impl<P> Descriptive for PollingInstrument<P>[src]
impl<P> PutsSnapshot for PollingInstrument<P> where
P: PutsSnapshot, [src]
P: PutsSnapshot,
fn put_snapshot(&self, into: &mut Snapshot, descriptive: bool)[src]
Auto Trait Implementations
impl<P> Send for PollingInstrument<P> where
P: Send,
P: Send,
impl<P> Sync for PollingInstrument<P> where
P: Sync,
P: Sync,
impl<P> Unpin for PollingInstrument<P> where
P: Unpin,
P: Unpin,
impl<P> UnwindSafe for PollingInstrument<P> where
P: UnwindSafe,
P: UnwindSafe,
impl<P> RefUnwindSafe for PollingInstrument<P> where
P: RefUnwindSafe,
P: RefUnwindSafe,
Blanket Implementations
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = !
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
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> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,