Enum sqruff_lib::utils::reflow::elements::ReflowElement
source · pub enum ReflowElement {
Block(ReflowBlock),
Point(ReflowPoint),
}
Variants§
Block(ReflowBlock)
Point(ReflowPoint)
Implementations§
source§impl ReflowElement
impl ReflowElement
pub fn raw(&self) -> String
pub fn segments(&self) -> &[ErasedSegment]
pub fn class_types1(&self) -> AHashSet<&str>
pub fn num_newlines(&self) -> usize
pub fn as_point(&self) -> Option<&ReflowPoint>
pub fn as_block(&self) -> Option<&ReflowBlock>
source§impl ReflowElement
impl ReflowElement
pub fn class_types(segments: &[ErasedSegment]) -> AHashSet<&'static str>
Trait Implementations§
source§impl Clone for ReflowElement
impl Clone for ReflowElement
source§fn clone(&self) -> ReflowElement
fn clone(&self) -> ReflowElement
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 ReflowElement
impl Debug for ReflowElement
source§impl From<ReflowBlock> for ReflowElement
impl From<ReflowBlock> for ReflowElement
source§fn from(value: ReflowBlock) -> Self
fn from(value: ReflowBlock) -> Self
Converts to this type from the input type.
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.
source§impl PartialEq<ReflowBlock> for ReflowElement
impl PartialEq<ReflowBlock> for ReflowElement
source§fn eq(&self, other: &ReflowBlock) -> bool
fn eq(&self, other: &ReflowBlock) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.Auto Trait Implementations§
impl Freeze for ReflowElement
impl !RefUnwindSafe for ReflowElement
impl Send for ReflowElement
impl Sync for ReflowElement
impl Unpin for ReflowElement
impl !UnwindSafe for ReflowElement
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