pub struct Hit<'a, D> {
pub describe: Cow<'a, str>,
pub importance: u8,
pub data: D,
}Expand description
规则命中的结果包装器。
包含了命中的描述信息、重要程度(用于风险评分)以及附加数据。
Fields§
§describe: Cow<'a, str>规则的名称或描述信息,支持借用或拥有所有权的字符串。
importance: u8该规则的重要程度(0-100),用于后续计算综合风险评分。
data: D命中的具体数据内容(通常是 RuleResult)。
Trait Implementations§
Auto Trait Implementations§
impl<'a, D> Freeze for Hit<'a, D>where
D: Freeze,
impl<'a, D> RefUnwindSafe for Hit<'a, D>where
D: RefUnwindSafe,
impl<'a, D> Send for Hit<'a, D>where
D: Send,
impl<'a, D> Sync for Hit<'a, D>where
D: Sync,
impl<'a, D> Unpin for Hit<'a, D>where
D: Unpin,
impl<'a, D> UnsafeUnpin for Hit<'a, D>where
D: UnsafeUnpin,
impl<'a, D> UnwindSafe for Hit<'a, D>where
D: UnwindSafe,
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
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> ⓘ
Converts
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> ⓘ
Converts
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