pub enum Indentation {
Tabs,
Spaces(usize),
}
Expand description
An enumeration of legal indentation types.
Variants§
Implementations§
Source§impl Indentation
impl Indentation
Sourcepub fn parse(rope: &Rope) -> Result<Option<Self>, MixedIndentError>
pub fn parse(rope: &Rope) -> Result<Option<Self>, MixedIndentError>
Parses a rope for indentation settings.
Sourcepub fn parse_line(line: &str) -> Result<Option<Self>, MixedIndentError>
pub fn parse_line(line: &str) -> Result<Option<Self>, MixedIndentError>
Detects the indentation on a specific line. Parses whitespace until first occurrence of something else
Trait Implementations§
Source§impl Clone for Indentation
impl Clone for Indentation
Source§fn clone(&self) -> Indentation
fn clone(&self) -> Indentation
Returns a copy 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 Indentation
impl Debug for Indentation
Source§impl Hash for Indentation
impl Hash for Indentation
Source§impl PartialEq for Indentation
impl PartialEq for Indentation
impl Copy for Indentation
impl Eq for Indentation
impl StructuralPartialEq for Indentation
Auto Trait Implementations§
impl Freeze for Indentation
impl RefUnwindSafe for Indentation
impl Send for Indentation
impl Sync for Indentation
impl Unpin for Indentation
impl UnwindSafe for Indentation
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