Trait envoy_sdk::host::stats::Counter [−][src]
An interface of the Envoy
Counter
.
A Counter
can only be incremented.
Examples
Basic usage of Counter
:
use envoy::host::Stats; let stats = Stats::default(); let requests_total = stats.counter("requests_total")?; requests_total.inc()?;
Required methods
fn add(&self, offset: u64) -> Result<()>
[src]
Increments counter by a given offset.
fn value(&self) -> Result<u64>
[src]
Returns current value of the counter.
Provided methods
Loading content...Implementations on Foreign Types
impl<T: Counter> Counter for Rc<T>
[src]
fn add(&self, offset: u64) -> Result<()>
[src]
Increments counter by a given offset.
fn value(&self) -> Result<u64>
[src]
Returns current value of the counter.