pub enum LayoutMode {
Lazy,
Eager,
}Expand description
Off-side rule variant.
Variants§
Lazy
Haskell-style: a layout block only opens after a keyword identified by
LayoutConfig::is_opener. Top-level tokens have no implicit block.
Eager
Python-style: the whole file is one layout block. The first token sets the top-level indent, every later indent change emits virtual tokens, and the top-level block closes only at end of input.
Trait Implementations§
Source§impl Clone for LayoutMode
impl Clone for LayoutMode
Source§fn clone(&self) -> LayoutMode
fn clone(&self) -> LayoutMode
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for LayoutMode
Source§impl Debug for LayoutMode
impl Debug for LayoutMode
Source§impl Default for LayoutMode
impl Default for LayoutMode
Source§fn default() -> LayoutMode
fn default() -> LayoutMode
Returns the “default value” for a type. Read more
impl Eq for LayoutMode
Source§impl PartialEq for LayoutMode
impl PartialEq for LayoutMode
Source§fn eq(&self, other: &LayoutMode) -> bool
fn eq(&self, other: &LayoutMode) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for LayoutMode
Auto Trait Implementations§
impl Freeze for LayoutMode
impl RefUnwindSafe for LayoutMode
impl Send for LayoutMode
impl Sync for LayoutMode
impl Unpin for LayoutMode
impl UnsafeUnpin for LayoutMode
impl UnwindSafe for LayoutMode
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