pub struct YamlParser;Expand description
Parser for YAML translation files
Implementations§
Source§impl YamlParser
impl YamlParser
Sourcepub fn contains_query(path: &Path, query: &str) -> Result<bool>
pub fn contains_query(path: &Path, query: &str) -> Result<bool>
Fast pre-check: does this file contain the search query? Uses grep library for exact match before expensive YAML parsing. Returns true if the file contains the query (case-insensitive).
pub fn parse_file(path: &Path) -> Result<Vec<TranslationEntry>>
Sourcepub fn parse_file_with_query(
path: &Path,
query: Option<&str>,
) -> Result<Vec<TranslationEntry>>
pub fn parse_file_with_query( path: &Path, query: Option<&str>, ) -> Result<Vec<TranslationEntry>>
Parse YAML file, optionally filtering by query for better performance. If query is provided, uses bottom-up approach: finds exact matches with grep, then traces keys upward WITHOUT parsing the entire YAML structure.
Auto Trait Implementations§
impl Freeze for YamlParser
impl RefUnwindSafe for YamlParser
impl Send for YamlParser
impl Sync for YamlParser
impl Unpin for YamlParser
impl UnwindSafe for YamlParser
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