pub struct ValidationOptions {
pub reject_null_bytes: bool,
pub reject_shell_metacharacters: bool,
pub reject_empty: bool,
}Expand description
Validation options for command arguments.
Fields§
§reject_null_bytes: boolWhether to reject null bytes.
reject_shell_metacharacters: boolWhether to reject shell metacharacters.
reject_empty: boolWhether to reject empty strings.
Implementations§
Source§impl ValidationOptions
impl ValidationOptions
Sourcepub const fn strict() -> Self
pub const fn strict() -> Self
Create strict validation options (rejects null bytes and empty strings).
Sourcepub const fn paranoid() -> Self
pub const fn paranoid() -> Self
Create paranoid validation options (rejects all potentially dangerous characters).
Sourcepub const fn permissive() -> Self
pub const fn permissive() -> Self
Create permissive validation options (only rejects null bytes).
Trait Implementations§
Source§impl Clone for ValidationOptions
impl Clone for ValidationOptions
Source§fn clone(&self) -> ValidationOptions
fn clone(&self) -> ValidationOptions
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 moreSource§impl Debug for ValidationOptions
impl Debug for ValidationOptions
Source§impl Default for ValidationOptions
impl Default for ValidationOptions
Source§fn default() -> ValidationOptions
fn default() -> ValidationOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ValidationOptions
impl RefUnwindSafe for ValidationOptions
impl Send for ValidationOptions
impl Sync for ValidationOptions
impl Unpin for ValidationOptions
impl UnwindSafe for ValidationOptions
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