pub struct DispositionPatterns { /* private fields */ }Expand description
Compiling a regex set is far more expensive than matching against it, and
every comment scanned under one set of options is matched against the very
same two sets. A caller explaining a whole file compiles them once here and
hands them to explain_disposition_with for each of its comments.
Implementations§
Source§impl DispositionPatterns
impl DispositionPatterns
Sourcepub fn compile(options: &ScanOptions) -> Result<Self, Error>
pub fn compile(options: &ScanOptions) -> Result<Self, Error>
The two sets options asks for, or the error the first pattern that
would not compile raised.
Sourcepub fn empty() -> Self
pub fn empty() -> Self
Sets that match nothing: what a pattern list that will not compile falls back to. The scanner reports such a list as a diagnostic and then scans as though it were empty, so an explanation has to ignore it the same way to stay in step with the verdict it is accounting for.
Trait Implementations§
Source§impl Clone for DispositionPatterns
impl Clone for DispositionPatterns
Source§fn clone(&self) -> DispositionPatterns
fn clone(&self) -> DispositionPatterns
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 DispositionPatterns
impl RefUnwindSafe for DispositionPatterns
impl Send for DispositionPatterns
impl Sync for DispositionPatterns
impl Unpin for DispositionPatterns
impl UnsafeUnpin for DispositionPatterns
impl UnwindSafe for DispositionPatterns
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