pub struct Counters { /* private fields */ }Implementations§
Source§impl Counters
impl Counters
pub fn new(history_size: usize) -> Self
pub fn register_group( &mut self, name: &'static str, descriptors: &[CounterDescriptor], ) -> CounterGroup
pub fn update(&mut self)
pub fn set(&mut self, id: CounterId, val: impl Into<Option<f32>>)
pub fn enable_history(&mut self, id: CounterId)
pub fn disable_history(&mut self, id: CounterId)
pub fn select_counters<'b, 'a: 'b>( &'a self, ids: impl Iterator<Item = CounterId>, selection: &'b mut Vec<&'a Counter>, )
pub fn get_counter(&self, id: CounterId) -> &Counter
pub fn find_group_by_name(&self, group_name: &str) -> Option<CounterGroup>
pub fn find_counter_by_name( &self, group_name: &str, counter_name: &str, ) -> Option<CounterId>
Auto Trait Implementations§
impl Freeze for Counters
impl RefUnwindSafe for Counters
impl Send for Counters
impl Sync for Counters
impl Unpin for Counters
impl UnsafeUnpin for Counters
impl UnwindSafe for Counters
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more