pub struct SanitizeContext {
pub now: Option<u64>,
pub is_new: Option<bool>,
}Expand description
SanitizeContext
Context that can be provided during sanitization. This may include runtime or request-specific data (timestamp, mode, actor, etc.).
NOTE: SanitizeContext is reserved for future context-aware sanitization. The *_with() methods are currently thin wrappers that delegate to the stateless versions. In the future, we may pass runtime data (e.g. now, is_new, actor) here so sanitizers can behave contextually without changing the trait shape.
Fields§
§now: Option<u64>§is_new: Option<bool>Implementations§
Trait Implementations§
Source§impl Clone for SanitizeContext
impl Clone for SanitizeContext
Source§fn clone(&self) -> SanitizeContext
fn clone(&self) -> SanitizeContext
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 SanitizeContext
impl Debug for SanitizeContext
Source§impl Default for SanitizeContext
impl Default for SanitizeContext
Source§fn default() -> SanitizeContext
fn default() -> SanitizeContext
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SanitizeContext
impl RefUnwindSafe for SanitizeContext
impl Send for SanitizeContext
impl Sync for SanitizeContext
impl Unpin for SanitizeContext
impl UnwindSafe for SanitizeContext
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