Trait gluon_base::source::Source[][src]

pub trait Source {
    fn new(s: &str) -> Self
    where
        Self: Sized
;
fn location(&self, byte: BytePos) -> Option<Location>;
fn span(&self) -> Span<BytePos>;
fn src(&self) -> &str;
fn src_slice(&self, span: Span<BytePos>) -> &str;
fn byte_index(&self, line: Line, column: Column) -> Option<BytePos>;
fn line_number_at_byte(&self, pos: BytePos) -> Option<Line>;
fn comment_start_before(&self, end: BytePos) -> BytePos;
fn comments_between(&self, span: Span<BytePos>) -> CommentIter<'_>
Notable traits for CommentIter<'a>
impl<'a> Iterator for CommentIter<'a> type Item = &'a str;
; }

Required methods

Returns the starting position of any comments and whitespace before end

Trait Implementations

Implementations on Foreign Types

Implementors