pub struct StatementAccumulator { /* private fields */ }
Expand description
Accumulates lines and tells you when a ucg Statement has been read.
Implementations§
Source§impl StatementAccumulator
impl StatementAccumulator
pub fn reset(&mut self)
pub fn next_line(&self) -> usize
pub fn last_line(&self) -> Option<&String>
Sourcepub fn get_statement(&mut self) -> Option<String>
pub fn get_statement(&mut self) -> Option<String>
Tells you if the latest line ends in the statement terminator.
Returns None if it wasn’t a terminated statement and leaves the accumulated lines alone.
Returns Some(String) with the terminated statement if it was a terminated statement and drains the accumulated statements out.
Auto Trait Implementations§
impl Freeze for StatementAccumulator
impl RefUnwindSafe for StatementAccumulator
impl Send for StatementAccumulator
impl Sync for StatementAccumulator
impl Unpin for StatementAccumulator
impl UnwindSafe for StatementAccumulator
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