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§
Sourcefn field_count(&self) -> usize
fn field_count(&self) -> usize
Returns the number of fields in the struct.
Sourcefn field_ref(&self, n: usize) -> Option<MetricItem<'_>>
fn field_ref(&self, n: usize) -> Option<MetricItem<'_>>
Returns the field name and dyn reference to the field.