pub struct PolicyPreview {
pub valid: bool,
pub error: Option<String>,
pub flagged: Vec<PreviewRow>,
pub shielded_matches: Vec<PreviewRow>,
pub messages_cited: usize,
pub corpus: usize,
pub unevaluated: Vec<String>,
}Expand description
What a policy WOULD do, without storing it or touching anyone.
This is the safety rail the designer is built around: a policy is never enabled from a form alone, it is enabled from a preview that named the members it would catch. An over-broad rule announces itself by catching regulars, and the fix is a button rather than a number.
Fields§
§valid: bool§error: Option<String>§flagged: Vec<PreviewRow>Members this policy would flag, worst first.
shielded_matches: Vec<PreviewRow>Members whose messages ALSO matched, and who were spared only because they have standing. This is the number that tells an admin a rule catches ordinary conversation: the flagged list can look small and harmless while every regular in the room tripped the same wire.
messages_cited: usize§corpus: usize§unevaluated: Vec<String>Rules that could not run here, so a silent zero never reads as “clean”.
Trait Implementations§
Source§impl Clone for PolicyPreview
impl Clone for PolicyPreview
Source§fn clone(&self) -> PolicyPreview
fn clone(&self) -> PolicyPreview
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PolicyPreview
impl Debug for PolicyPreview
Auto Trait Implementations§
impl Freeze for PolicyPreview
impl RefUnwindSafe for PolicyPreview
impl Send for PolicyPreview
impl Sync for PolicyPreview
impl Unpin for PolicyPreview
impl UnsafeUnpin for PolicyPreview
impl UnwindSafe for PolicyPreview
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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