pub struct Rule {
pub name: &'static str,
pub default: Level,
pub side: Side,
pub surfaces: Surfaces,
}Expand description
One rule: the name it is reported and configured under, the level a project that says nothing about it gets, which half implements it, and where the name is taken.
Fields§
§name: &'static strThe one spelling of this rule everywhere it can be named: a report’s [htl <name>]
suffix, [lint.rules], --lint, HTL_LINTS, -- htl: allow(...), and the fix
filters. A tl: prefix marks a name the Teal compiler gave rather than htl.
default: LevelWhat a check says under this name for a project that configures nothing. A
Surfaces::FixOnly rule is Level::Allow, which is not a placeholder: no
check reports under it, so “nothing is said under this name” is the true answer,
and it is the answer nothing can change — the listing does not print it and a spec
refuses to set it.
side: SideWhich half of htl implements it, and so where a finding under it comes from. Not a setting — a project cannot move a rule from one side to the other — but it is what decides which selection table a run hands the name to.
surfaces: SurfacesWhich of the two name surfaces may contain it. See Surfaces.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Rule
impl RefUnwindSafe for Rule
impl Send for Rule
impl Sync for Rule
impl Unpin for Rule
impl UnsafeUnpin for Rule
impl UnwindSafe for Rule
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more