Struct sqruff_lib::core::parser::segments::base::SegmentBuilder
source · pub struct SegmentBuilder { /* private fields */ }Implementations§
source§impl SegmentBuilder
impl SegmentBuilder
pub fn whitespace(id: u32, raw: &str) -> ErasedSegment
pub fn newline(id: u32, raw: &str) -> ErasedSegment
pub fn keyword(id: u32, raw: &str) -> ErasedSegment
pub fn symbol(id: u32, raw: &str) -> ErasedSegment
pub fn node( id: u32, syntax_kind: SyntaxKind, dialect: DialectKind, segments: Vec<ErasedSegment>, ) -> Self
pub fn token(id: u32, raw: &str, syntax_kind: SyntaxKind) -> Self
pub fn position_from_segments(self) -> Self
pub fn with_position(self, position: PositionMarker) -> Self
pub fn finish(self) -> ErasedSegment
Auto Trait Implementations§
impl !Freeze for SegmentBuilder
impl !RefUnwindSafe for SegmentBuilder
impl !Send for SegmentBuilder
impl !Sync for SegmentBuilder
impl Unpin for SegmentBuilder
impl !UnwindSafe for SegmentBuilder
Blanket Implementations§
source§impl<T> AsAnyMut for Twhere
T: Any,
impl<T> AsAnyMut for Twhere
T: Any,
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
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