pub struct CodeReference {
pub file: PathBuf,
pub line: usize,
pub pattern: String,
pub context: String,
pub key_path: String,
pub context_before: Vec<String>,
pub context_after: Vec<String>,
}Expand description
Represents a code reference to a translation key
Fields§
§file: PathBufPath to the file containing the reference
line: usizeLine number (1-indexed)
pattern: StringThe regex pattern that matched
context: StringThe actual line of code containing the match
key_path: StringThe translation key path that was matched
context_before: Vec<String>Context lines before the match
context_after: Vec<String>Context lines after the match
Trait Implementations§
Source§impl Clone for CodeReference
impl Clone for CodeReference
Source§fn clone(&self) -> CodeReference
fn clone(&self) -> CodeReference
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 CodeReference
impl Debug for CodeReference
Source§impl PartialEq for CodeReference
impl PartialEq for CodeReference
impl StructuralPartialEq for CodeReference
Auto Trait Implementations§
impl Freeze for CodeReference
impl RefUnwindSafe for CodeReference
impl Send for CodeReference
impl Sync for CodeReference
impl Unpin for CodeReference
impl UnwindSafe for CodeReference
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