pub struct LintField {
pub name: String,
pub kind: FieldKind,
pub cardinality: Cardinality,
pub classification: Classification,
pub has_metric: bool,
pub proto_type: Option<LintProtoType>,
}Expand description
One field’s worth of lint input.
Fields§
§name: StringField name as authored (String for proto, the Rust ident for
the derive path).
kind: FieldKindEffective field kind (defaulted to Attribute when absent).
cardinality: CardinalityEffective cardinality.
classification: ClassificationEffective classification.
has_metric: booltrue when a Measurement-kind field declares a metric kind
(counter / gauge / histogram). The lint pass only needs the
presence bit to fire L004; the actual kind/unit/bounds are
consumed downstream by the codegen.
proto_type: Option<LintProtoType>Proto/Rust type the field declares. None for callers that
cannot infer it; type-aware lints skip in that case.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LintField
impl RefUnwindSafe for LintField
impl Send for LintField
impl Sync for LintField
impl Unpin for LintField
impl UnsafeUnpin for LintField
impl UnwindSafe for LintField
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