pub enum IndentStyle {
Tabs,
Spaces(u8),
}
Expand description
Enum representing indentation style.
Only values 1-8 are valid for the Spaces
variant.
Variants§
Implementations§
Source§impl IndentStyle
impl IndentStyle
pub const LONGEST_INDENT: &'static str = " "
pub const DEFAULT_INDENT: IndentStyle
Sourcepub fn from_str(indent: &str) -> Self
pub fn from_str(indent: &str) -> Self
Creates an IndentStyle
from an indentation string.
For example, passing " "
(four spaces) will create IndentStyle::Spaces(4)
.
pub fn as_str(&self) -> &'static str
Trait Implementations§
Source§impl Clone for IndentStyle
impl Clone for IndentStyle
Source§fn clone(&self) -> IndentStyle
fn clone(&self) -> IndentStyle
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 IndentStyle
impl Debug for IndentStyle
Source§impl Display for IndentStyle
impl Display for IndentStyle
Source§impl Hash for IndentStyle
impl Hash for IndentStyle
Source§impl PartialEq for IndentStyle
impl PartialEq for IndentStyle
impl Copy for IndentStyle
impl Eq for IndentStyle
impl StructuralPartialEq for IndentStyle
Auto Trait Implementations§
impl Freeze for IndentStyle
impl RefUnwindSafe for IndentStyle
impl Send for IndentStyle
impl Sync for IndentStyle
impl Unpin for IndentStyle
impl UnwindSafe for IndentStyle
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more