Struct sqruff_lib::utils::reflow::elements::ReflowPoint
source · pub struct ReflowPoint {
pub segments: Vec<ErasedSegment>,
pub stats: IndentStats,
}
Fields§
§segments: Vec<ErasedSegment>
§stats: IndentStats
Implementations§
source§impl ReflowPoint
impl ReflowPoint
pub fn new(segments: Vec<ErasedSegment>) -> Self
pub fn raw(&self) -> String
pub fn class_types(&self) -> AHashSet<&str>
pub fn get_indent_segment(&self) -> Option<ErasedSegment>
pub fn get_indent(&self) -> Option<String>
pub fn indent_to( &self, desired_indent: &str, after: Option<ErasedSegment>, before: Option<ErasedSegment>, _description: Option<&str>, source: Option<&str> ) -> (Vec<LintResult>, ReflowPoint)
pub fn respace_point( &self, prev_block: Option<&ReflowBlock>, next_block: Option<&ReflowBlock>, lint_results: Vec<LintResult>, strip_newlines: bool ) -> (Vec<LintResult>, ReflowPoint)
pub fn indent_impulse(&self) -> IndentStats
Trait Implementations§
source§impl Clone for ReflowPoint
impl Clone for ReflowPoint
source§fn clone(&self) -> ReflowPoint
fn clone(&self) -> ReflowPoint
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 ReflowPoint
impl Debug for ReflowPoint
source§impl Default for ReflowPoint
impl Default for ReflowPoint
source§fn default() -> ReflowPoint
fn default() -> ReflowPoint
Returns the “default value” for a type. Read more
source§impl From<ReflowPoint> for ReflowElement
impl From<ReflowPoint> for ReflowElement
source§fn from(value: ReflowPoint) -> Self
fn from(value: ReflowPoint) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ReflowPoint
impl !RefUnwindSafe for ReflowPoint
impl Send for ReflowPoint
impl Sync for ReflowPoint
impl Unpin for ReflowPoint
impl !UnwindSafe for ReflowPoint
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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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