pub enum SafetyVerdict {
Pass,
Block(String),
Redact(SanitizedOutput),
}Expand description
Result of running the 3-gate pipeline on one input.
Variants§
Pass
All three gates passed. Forward the input as-is.
Block(String)
At least one gate flagged the input as unsafe. The carried string is a human-readable reason describing which gate fired and (when known) what pattern triggered.
Redact(SanitizedOutput)
PII detection or sanitization rewrote the input. The carried
SanitizedOutput holds the cleaned content + a list of
redactions that were applied; forward the sanitized variant.
Implementations§
Source§impl SafetyVerdict
impl SafetyVerdict
Sourcepub fn is_forwardable(&self) -> bool
pub fn is_forwardable(&self) -> bool
True when the verdict allows the message to be forwarded (either as-is or after redaction).
Sourcepub fn is_blocked(&self) -> bool
pub fn is_blocked(&self) -> bool
True when the verdict requires the message to be quarantined.
Trait Implementations§
Source§impl Clone for SafetyVerdict
impl Clone for SafetyVerdict
Source§fn clone(&self) -> SafetyVerdict
fn clone(&self) -> SafetyVerdict
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 moreAuto Trait Implementations§
impl Freeze for SafetyVerdict
impl RefUnwindSafe for SafetyVerdict
impl Send for SafetyVerdict
impl Sync for SafetyVerdict
impl Unpin for SafetyVerdict
impl UnsafeUnpin for SafetyVerdict
impl UnwindSafe for SafetyVerdict
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