pub(crate) struct Indentation {
should_line_break: bool,
indent_char: u8,
indent_size: usize,
indents: Vec<u8>,
current_indent_len: usize,
}
Fields§
§should_line_break: bool
todo: this is an awkward fit as it has no impact on indentation logic, but it is only applicable when an indentation exists. Potentially refactor later
indent_char: u8
The character code to be used for indentations (e.g.
or \t
)
indent_size: usize
How many instances of the indent character ought to be used for each level of indentation
indents: Vec<u8>
Used as a cache for the bytes used for indentation
current_indent_len: usize
The current amount of indentation
Implementations§
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 moreAuto 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)