pub enum InputProcessorResult {
Pass,
Block {
reason: String,
processor: String,
},
Modify {
original: String,
modified: String,
changes: Vec<String>,
},
}Expand description
Result of input processing
Variants§
Pass
Input is safe, proceed with execution
Block
Input is blocked - do not execute
Modify
Input was modified (sanitized) - proceed with modified input
Implementations§
Source§impl InputProcessorResult
impl InputProcessorResult
Sourcepub fn should_proceed(&self) -> bool
pub fn should_proceed(&self) -> bool
Returns true if execution should proceed
Sourcepub fn is_blocked(&self) -> bool
pub fn is_blocked(&self) -> bool
Returns true if input was blocked
Sourcepub fn effective_input<'a>(&'a self, original: &'a str) -> &'a str
pub fn effective_input<'a>(&'a self, original: &'a str) -> &'a str
Get the input to use for execution (original or modified)
Trait Implementations§
Source§impl Clone for InputProcessorResult
impl Clone for InputProcessorResult
Source§fn clone(&self) -> InputProcessorResult
fn clone(&self) -> InputProcessorResult
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 InputProcessorResult
impl RefUnwindSafe for InputProcessorResult
impl Send for InputProcessorResult
impl Sync for InputProcessorResult
impl Unpin for InputProcessorResult
impl UnsafeUnpin for InputProcessorResult
impl UnwindSafe for InputProcessorResult
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