#[non_exhaustive]pub struct DetectContext<'a> {
pub locale_chain: &'a [LocaleTag],
pub dictionaries: &'a DictionaryBundle,
pub fields: &'a (),
pub degraded: Cell<bool>,
}Expand description
Context supplied to recognizers during detection.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.locale_chain: &'a [LocaleTag]Active locale chain.
dictionaries: &'a DictionaryBundleActive dictionary bundle.
fields: &'a ()Reserved field-aware matching slot; intentionally unit in v0.5 Phase B.
degraded: Cell<bool>Whether a recognizer degraded due to unavailable optional capability.
Implementations§
Source§impl<'a> DetectContext<'a>
impl<'a> DetectContext<'a>
Sourcepub fn new(
locale_chain: &'a [LocaleTag],
dictionaries: &'a DictionaryBundle,
) -> Self
pub fn new( locale_chain: &'a [LocaleTag], dictionaries: &'a DictionaryBundle, ) -> Self
Builds detection context for a recognizer pass.
Auto Trait Implementations§
impl<'a> !Freeze for DetectContext<'a>
impl<'a> !RefUnwindSafe for DetectContext<'a>
impl<'a> Send for DetectContext<'a>
impl<'a> !Sync for DetectContext<'a>
impl<'a> Unpin for DetectContext<'a>
impl<'a> UnsafeUnpin for DetectContext<'a>
impl<'a> UnwindSafe for DetectContext<'a>
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