pub struct ControlCharRule { /* private fields */ }Expand description
Rejects input containing control characters (U+0000–U+001F, U+007F, U+0080–U+009F).
Allowed exceptions can be configured (e.g. tab \t).
§Rationale
Control characters (especially newline, NUL, ESC) can cause:
- Command splitting when injected into shell strings
- Terminal escape sequence attacks
- NUL-byte truncation in C-backed APIs
Implementations§
Trait Implementations§
Source§impl Default for ControlCharRule
impl Default for ControlCharRule
Auto Trait Implementations§
impl Freeze for ControlCharRule
impl RefUnwindSafe for ControlCharRule
impl Send for ControlCharRule
impl Sync for ControlCharRule
impl Unpin for ControlCharRule
impl UnsafeUnpin for ControlCharRule
impl UnwindSafe for ControlCharRule
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