pub struct StringLiteralState {
pub in_normal_string: bool,
pub raw_hashes: Option<usize>,
}Expand description
State machine for tracking string literal boundaries across lines.
Used by strip_string_literals to correctly handle multi-line strings
and avoid false positives from pattern matching inside string content.
Fields§
§in_normal_string: boolCurrently inside a regular "..." string
raw_hashes: Option<usize>Currently inside a raw string r#"..."# with this many hashes
Trait Implementations§
Source§impl Clone for StringLiteralState
impl Clone for StringLiteralState
Source§fn clone(&self) -> StringLiteralState
fn clone(&self) -> StringLiteralState
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 Default for StringLiteralState
impl Default for StringLiteralState
Source§fn default() -> StringLiteralState
fn default() -> StringLiteralState
Returns the “default value” for a type. Read more
impl Copy for StringLiteralState
Auto Trait Implementations§
impl Freeze for StringLiteralState
impl RefUnwindSafe for StringLiteralState
impl Send for StringLiteralState
impl Sync for StringLiteralState
impl Unpin for StringLiteralState
impl UnsafeUnpin for StringLiteralState
impl UnwindSafe for StringLiteralState
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> 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