pub struct Screen { /* private fields */ }Expand description
Screening rules with their configuration resolved once.
Implementations§
Source§impl Screen
impl Screen
Sourcepub fn for_installation() -> Self
pub fn for_installation() -> Self
Rules of this installation (custom secret patterns, redaction
excludes, the active pack’s [egress] forbidden_patterns). A pattern
that does not compile fails closed: the screen then refuses every
text (Blocked::BrokenRules, Screen::problem).
Sourcepub fn problem(&self) -> Option<String>
pub fn problem(&self) -> Option<String>
Why this screen lets nothing pass (a broken rule), for status lines and the callers that stop all Cloud content traffic on it.
Sourcepub fn check(&mut self, text: &str) -> Result<(), Blocked>
pub fn check(&mut self, text: &str) -> Result<(), Blocked>
Ok(()) when text may leave the machine; otherwise the reason, and
the drop is counted.
Sourcepub fn counts(&self) -> EngineScreeningV1
pub fn counts(&self) -> EngineScreeningV1
The counts for engine_screening.
Auto Trait Implementations§
impl Forget for Screen
impl Freeze for Screenwhere
*const u8 is !null: Freeze,
PhantomData<String>: Freeze,
*const ArcInner<Vec<Regex>> is !null: Freeze,
PhantomData<ArcInner<Vec<Regex>>>: Freeze,
PhantomData<Regex>: Freeze,
PhantomData<u8>: Freeze,
impl Move for Screen
impl RefUnwindSafe for Screenwhere
Atomic<usize>: RefUnwindSafe,
Pool<Cache, Box<dyn Fn() -> Cache + Sync + RefUnwindSafe + Send + UnwindSafe>>: RefUnwindSafe,
impl Send for Screen
impl Sync for Screen
impl Unpin for Screen
impl UnsafeUnpin for Screenwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
*const ArcInner<Vec<Regex>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Vec<Regex>>>: UnsafeUnpin,
PhantomData<Regex>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
impl UnwindSafe for Screenwhere
RawVecInner: UnwindSafe,
Arc<Vec<Regex>>: UnwindSafe,
Arc<RegexI>: UnwindSafe,
BoxRaw<Pool<Cache, Box<dyn Fn() -> Cache + Sync + RefUnwindSafe + Send + UnwindSafe>>>: UnwindSafe,
Arc<str>: 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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