pub struct LineBuilder { /* private fields */ }Expand description
Builder for formatted output lines.
Constructs lines following the column layout:
<indent><step><gap><symbol><gap><content>...<successors>
Implementations§
Source§impl LineBuilder
impl LineBuilder
Sourcepub fn instruction_prefix(&self, step: u16, symbol: Symbol) -> String
pub fn instruction_prefix(&self, step: u16, symbol: Symbol) -> String
Build an instruction line prefix: <step> <symbol>
Sourcepub fn subline_prefix(&self, symbol: Symbol) -> String
pub fn subline_prefix(&self, symbol: Symbol) -> String
Build a sub-line prefix (blank step area): <symbol>
Sourcepub fn backtrack_line(&self, step: u16) -> String
pub fn backtrack_line(&self, step: u16) -> String
Build a backtrack line: <step> ❮❮❮
Sourcepub fn pad_successors(&self, base: String, successors: &str) -> String
pub fn pad_successors(&self, base: String, successors: &str) -> String
Pad content to total width and append successors.
Ensures at least 2 spaces between content and successors.
Auto Trait Implementations§
impl Freeze for LineBuilder
impl RefUnwindSafe for LineBuilder
impl Send for LineBuilder
impl Sync for LineBuilder
impl Unpin for LineBuilder
impl UnwindSafe for LineBuilder
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