pub struct Policy { /* private fields */ }Implementations§
Source§impl Policy
impl Policy
pub fn new( programs: MultiMap<String, ProgramSpec>, forbidden_program_regexes: Vec<ForbiddenProgramRegex>, forbidden_substrings: Vec<String>, ) -> Result<Self, RegexError>
pub fn check(&self, exec_call: &ExecCall) -> Result<MatchedExec>
pub fn check_each_good_list_individually( &self, ) -> Vec<PositiveExampleFailedCheck>
pub fn check_each_bad_list_individually( &self, ) -> Vec<NegativeExamplePassedCheck>
Auto Trait Implementations§
impl !Freeze for Policy
impl RefUnwindSafe for Policy
impl Send for Policy
impl Sync for Policy
impl Unpin for Policy
impl UnwindSafe for Policy
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