pub struct PatternOptions {
pub literal: bool,
pub ignore_case: bool,
pub single_line: bool,
}Expand description
Knobs controlling how a pattern string is compiled into a regex.
literal— treat the pattern (and replacement) as plain text; metacharacters are escaped.ignore_case— case-insensitive matching.single_line— disable the implicit(?s). With it off (the default),.matches\n, which is what most LLM-driven rewrites expect.
Fields§
§literal: bool§ignore_case: bool§single_line: boolTrait Implementations§
Source§impl Clone for PatternOptions
impl Clone for PatternOptions
Source§fn clone(&self) -> PatternOptions
fn clone(&self) -> PatternOptions
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 moreSource§impl Debug for PatternOptions
impl Debug for PatternOptions
Source§impl Default for PatternOptions
impl Default for PatternOptions
Source§fn default() -> PatternOptions
fn default() -> PatternOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PatternOptions
impl RefUnwindSafe for PatternOptions
impl Send for PatternOptions
impl Sync for PatternOptions
impl Unpin for PatternOptions
impl UnsafeUnpin for PatternOptions
impl UnwindSafe for PatternOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more