pub struct LayoutContext {
pub tab_width: usize,
/* private fields */
}Expand description
Context passed around during layout-sensitive parsing.
Fields§
§tab_width: usizeImplementations§
Source§impl LayoutContext
impl LayoutContext
pub fn new(tab_width: usize) -> Self
pub fn push_rule(&mut self, rule: LayoutRule)
pub fn pop_rule(&mut self) -> Option<LayoutRule>
pub fn current_rule(&self) -> Option<&LayoutRule>
pub fn indent_col(line: &str, tab_width: usize) -> usize
pub fn line_continues_block(&self, line: &str) -> bool
pub fn depth(&self) -> usize
pub fn clear(&mut self)
Trait Implementations§
Source§impl Clone for LayoutContext
impl Clone for LayoutContext
Source§fn clone(&self) -> LayoutContext
fn clone(&self) -> LayoutContext
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 LayoutContext
impl Debug for LayoutContext
Auto Trait Implementations§
impl Freeze for LayoutContext
impl RefUnwindSafe for LayoutContext
impl Send for LayoutContext
impl Sync for LayoutContext
impl Unpin for LayoutContext
impl UnsafeUnpin for LayoutContext
impl UnwindSafe for LayoutContext
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