Struct sqruff_lib::utils::reflow::elements::ReflowPoint
source · pub struct ReflowPoint {
pub segments: Vec<Box<dyn Segment>>,
pub stats: IndentStats,
}
Fields§
§segments: Vec<Box<dyn Segment>>
§stats: IndentStats
Implementations§
source§impl ReflowPoint
impl ReflowPoint
pub fn new(segments: Vec<Box<dyn Segment>>) -> Self
pub fn class_types(&self) -> HashSet<String>
pub fn get_indent_segment(&self) -> Option<Box<dyn Segment>>
pub fn get_indent(&self) -> Option<String>
pub fn indent_to( &self, desired_indent: &str, after: Option<Box<dyn Segment>>, before: Option<Box<dyn Segment>>, 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 !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