pub struct ProcessAllowlist { /* private fields */ }Expand description
The programs a ProcessRunner may start.
Configuration, never code: a product declares its allowed programs (git,
its configured editors, its terminal launchers). Every implementation must
call ProcessAllowlist::check before handing a program to the operating
system — the contract test enforces this.
Implementations§
Source§impl ProcessAllowlist
impl ProcessAllowlist
pub fn new(programs: impl IntoIterator<Item = impl Into<String>>) -> Self
pub fn allows(&self, program: &str) -> bool
Trait Implementations§
Source§impl Clone for ProcessAllowlist
impl Clone for ProcessAllowlist
Source§fn clone(&self) -> ProcessAllowlist
fn clone(&self) -> ProcessAllowlist
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 ProcessAllowlist
impl Debug for ProcessAllowlist
Source§impl Default for ProcessAllowlist
impl Default for ProcessAllowlist
Source§fn default() -> ProcessAllowlist
fn default() -> ProcessAllowlist
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ProcessAllowlist
impl RefUnwindSafe for ProcessAllowlist
impl Send for ProcessAllowlist
impl Sync for ProcessAllowlist
impl Unpin for ProcessAllowlist
impl UnsafeUnpin for ProcessAllowlist
impl UnwindSafe for ProcessAllowlist
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