pub struct PoParser<'a> {
texts: Vec<&'a str>,
pos: usize,
llm_mark: Option<&'a str>,
}Fields§
§texts: Vec<&'a str>§pos: usize§llm_mark: Option<&'a str>Implementations§
Source§impl<'a> PoParser<'a>
impl<'a> PoParser<'a>
pub fn new(s: &'a str, llm_mark: Option<&'a str>) -> Self
pub fn parse_lines(&mut self) -> Result<Vec<PoLine>>
fn read_string_literal(&mut self, s: &str) -> Result<String>
pub fn parse_entries(&mut self) -> Result<Vec<PoEntry>>
fn build_entry_from_lines(&self, lines: Vec<PoLine>) -> Result<PoEntry>
fn peek(&self) -> Option<&'a str>
fn peek_line(&self) -> Option<String>
fn next_line(&mut self) -> Option<String>
fn next(&mut self) -> Option<&'a str>
pub fn parse_as_vec(&mut self) -> Result<Vec<(String, String)>>
pub fn parse(&mut self) -> Result<Vec<Message>>
Auto Trait Implementations§
impl<'a> Freeze for PoParser<'a>
impl<'a> RefUnwindSafe for PoParser<'a>
impl<'a> Send for PoParser<'a>
impl<'a> Sync for PoParser<'a>
impl<'a> Unpin for PoParser<'a>
impl<'a> UnwindSafe for PoParser<'a>
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> 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