[−][src]Struct fluvio_system_util::counters::CounterTable
Fields
columns: BTreeMap<C, Column>
rows: RwLock<BTreeMap<T, BTreeMap<C, u32>>>
Implementations
impl<T, C> CounterTable<T, C> where
C: Ord + Clone,
T: Ord,
[src]
C: Ord + Clone,
T: Ord,
pub fn with_columns(self, columns: Vec<(C, &'static str, bool)>) -> Self
[src]
builder pattern to add columns
pub fn add_row(&self, row_id: T)
[src]
create a row and add counter columns
pub fn remove_row(&self, row_id: &T)
[src]
remove counter row
pub fn row_count(&self) -> usize
[src]
number of rows
pub fn inc_counter(&self, row_id: &T, column_id: C)
[src]
increment counter
pub fn set_counter(&self, row_id: &T, column_id: C, val: u32)
[src]
set counter
pub fn reset_counters(&self)
[src]
reset all counters
pub fn header_fmt(&self) -> String
[src]
column headers in string format (center justified, min 10 spaces)
pub fn values_fmt(&self, row_id: T) -> String
[src]
format values in string format (center justified to column header - min 10 spaces)
Trait Implementations
impl<T: Debug, C: Debug> Debug for CounterTable<T, C>
[src]
impl<T, C> Default for CounterTable<T, C> where
C: Ord,
T: Ord,
[src]
C: Ord,
T: Ord,
impl<T, C> PartialEq<CounterTable<T, C>> for CounterTable<T, C> where
C: PartialEq,
T: PartialEq,
[src]
C: PartialEq,
T: PartialEq,
Auto Trait Implementations
impl<T, C> RefUnwindSafe for CounterTable<T, C> where
C: RefUnwindSafe,
[src]
C: RefUnwindSafe,
impl<T, C> Send for CounterTable<T, C> where
C: Send,
T: Send,
[src]
C: Send,
T: Send,
impl<T, C> Sync for CounterTable<T, C> where
C: Send + Sync,
T: Send + Sync,
[src]
C: Send + Sync,
T: Send + Sync,
impl<T, C> Unpin for CounterTable<T, C>
[src]
impl<T, C> UnwindSafe for CounterTable<T, C> where
C: RefUnwindSafe,
[src]
C: RefUnwindSafe,
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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[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 = Infallible
The type returned in the event of a conversion error.
pub 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.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,