pub struct IndentOptions<'a, 'b> {
pub indentor: Option<&'a str>,
pub exclude: &'b [(u32, u32)],
}Fields§
§indentor: Option<&'a str>MagicString will guess the indentor from lines of the source if passed None.
exclude: &'b [(u32, u32)]The reason I use [u32; 2] instead of (u32, u32) to represent a range of text is that
I want to emphasize that the [u32; 2] is the closed interval, which means both the start
and the end are included in the range.
Trait Implementations§
Source§impl<'a, 'b> Debug for IndentOptions<'a, 'b>
impl<'a, 'b> Debug for IndentOptions<'a, 'b>
Source§impl<'a, 'b> Default for IndentOptions<'a, 'b>
impl<'a, 'b> Default for IndentOptions<'a, 'b>
Source§fn default() -> IndentOptions<'a, 'b>
fn default() -> IndentOptions<'a, 'b>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'a, 'b> Freeze for IndentOptions<'a, 'b>
impl<'a, 'b> RefUnwindSafe for IndentOptions<'a, 'b>
impl<'a, 'b> Send for IndentOptions<'a, 'b>
impl<'a, 'b> Sync for IndentOptions<'a, 'b>
impl<'a, 'b> Unpin for IndentOptions<'a, 'b>
impl<'a, 'b> UnsafeUnpin for IndentOptions<'a, 'b>
impl<'a, 'b> UnwindSafe for IndentOptions<'a, 'b>
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> 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