pub struct IndentOptions { /* private fields */ }
Implementations§
Source§impl IndentOptions
impl IndentOptions
pub fn new(typ: IndentType, width: usize, split_line_attributes: bool) -> Self
Sourcepub fn indent_str(&self) -> &str
pub fn indent_str(&self) -> &str
Gets a string containing one indent worth of whitespace
Sourcepub fn line_length(&self, line: &str) -> usize
pub fn line_length(&self, line: &str) -> usize
Computes the line length in characters, counting tabs as the indent width.
Sourcepub fn count_indents(&self, line: &str) -> usize
pub fn count_indents(&self, line: &str) -> usize
Estimates how many times the line has been indented.
pub fn split_line_attributes(&self) -> bool
Trait Implementations§
Source§impl Clone for IndentOptions
impl Clone for IndentOptions
Source§fn clone(&self) -> IndentOptions
fn clone(&self) -> IndentOptions
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 IndentOptions
impl Debug for IndentOptions
Auto Trait Implementations§
impl Freeze for IndentOptions
impl RefUnwindSafe for IndentOptions
impl Send for IndentOptions
impl Sync for IndentOptions
impl Unpin for IndentOptions
impl UnwindSafe for IndentOptions
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