pub struct ShellPolicy {
pub allowed_commands: Vec<String>,
pub max_args: usize,
pub max_arg_length: usize,
pub max_output_bytes: usize,
pub forbidden_chars: String,
pub command_policy: Option<ShellCommandPolicy>,
}Fields§
§allowed_commands: Vec<String>§max_args: usize§max_arg_length: usize§max_output_bytes: usize§forbidden_chars: String§command_policy: Option<ShellCommandPolicy>Context-aware policy. When Some, uses quote-aware validation.
When None, falls back to legacy flat forbidden_chars check.
Implementations§
Source§impl ShellPolicy
impl ShellPolicy
pub fn default_with_commands(allowed_commands: Vec<String>) -> Self
Trait Implementations§
Source§impl Clone for ShellPolicy
impl Clone for ShellPolicy
Source§fn clone(&self) -> ShellPolicy
fn clone(&self) -> ShellPolicy
Returns a duplicate of the value. Read more
1.0.0 · 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 ShellPolicy
impl RefUnwindSafe for ShellPolicy
impl Send for ShellPolicy
impl Sync for ShellPolicy
impl Unpin for ShellPolicy
impl UnsafeUnpin for ShellPolicy
impl UnwindSafe for ShellPolicy
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