iroh_metrics::iterable

Trait Iterable

Source
pub trait Iterable {
    // Required methods
    fn field_count(&self) -> usize;
    fn field_ref(&self, n: usize) -> Option<MetricItem<'_>>;
}
Expand description

Trait for iterating over the fields of a struct.

Required Methods§

Source

fn field_count(&self) -> usize

Returns the number of fields in the struct.

Source

fn field_ref(&self, n: usize) -> Option<MetricItem<'_>>

Returns the field name and dyn reference to the field.

Implementors§