pub struct SourceCursor<'a> { /* private fields */ }Expand description
Implementations§
Source§impl<'a> SourceCursor<'a>
impl<'a> SourceCursor<'a>
pub const SPACE: SourceCursor<'static>
pub const TAB: SourceCursor<'static>
pub const NEWLINE: SourceCursor<'static>
pub const fn from(cursor: Cursor, source: &'a str) -> Self
pub const fn cursor(&self) -> Cursor
pub const fn token(&self) -> Token
pub const fn source(&self) -> &'a str
pub fn with_quotes(&self, quote_style: QuoteStyle) -> Self
pub fn with_associated_whitespace( &self, rules: AssociatedWhitespaceRules, ) -> Self
pub fn eq_ignore_ascii_case(&self, other: &str) -> bool
Sourcepub fn parse<A: Allocator + Clone + 'a>(&self, allocator: A) -> CowStr<'a, A>
pub fn parse<A: Allocator + Clone + 'a>(&self, allocator: A) -> CowStr<'a, A>
Parse the cursor’s content using any allocator that implements the Allocator trait.
Sourcepub fn parse_ascii_lower<A: Allocator + Clone + 'a>(
&self,
allocator: A,
) -> CowStr<'a, A>
pub fn parse_ascii_lower<A: Allocator + Clone + 'a>( &self, allocator: A, ) -> CowStr<'a, A>
Parse the cursor’s content to ASCII lowercase using any allocator that implements the Allocator trait.
Trait Implementations§
Source§impl<'a> Clone for SourceCursor<'a>
impl<'a> Clone for SourceCursor<'a>
Source§fn clone(&self) -> SourceCursor<'a>
fn clone(&self) -> SourceCursor<'a>
Returns a duplicate 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<'a> Debug for SourceCursor<'a>
impl<'a> Debug for SourceCursor<'a>
Source§impl<'a> Display for SourceCursor<'a>
impl<'a> Display for SourceCursor<'a>
Source§impl From<SourceCursor<'_>> for KindSet
impl From<SourceCursor<'_>> for KindSet
Source§fn from(cursor: SourceCursor<'_>) -> Self
fn from(cursor: SourceCursor<'_>) -> Self
Converts to this type from the input type.
Source§impl<'a> Hash for SourceCursor<'a>
impl<'a> Hash for SourceCursor<'a>
Source§impl<'a> Ord for SourceCursor<'a>
impl<'a> Ord for SourceCursor<'a>
Source§fn cmp(&self, other: &SourceCursor<'a>) -> Ordering
fn cmp(&self, other: &SourceCursor<'a>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq<CommentStyle> for SourceCursor<'_>
impl PartialEq<CommentStyle> for SourceCursor<'_>
Source§impl PartialEq<Kind> for SourceCursor<'_>
impl PartialEq<Kind> for SourceCursor<'_>
Source§impl PartialEq<KindSet> for SourceCursor<'_>
impl PartialEq<KindSet> for SourceCursor<'_>
Source§impl<'a> PartialEq for SourceCursor<'a>
impl<'a> PartialEq for SourceCursor<'a>
Source§impl<'a> PartialOrd for SourceCursor<'a>
impl<'a> PartialOrd for SourceCursor<'a>
impl<'a> Copy for SourceCursor<'a>
impl<'a> Eq for SourceCursor<'a>
impl<'a> StructuralPartialEq for SourceCursor<'a>
Auto Trait Implementations§
impl<'a> Freeze for SourceCursor<'a>
impl<'a> RefUnwindSafe for SourceCursor<'a>
impl<'a> Send for SourceCursor<'a>
impl<'a> Sync for SourceCursor<'a>
impl<'a> Unpin for SourceCursor<'a>
impl<'a> UnwindSafe for SourceCursor<'a>
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