[−][src]Trait gluon_base::source::Source
Required methods
fn new(s: &str) -> Self where
Self: Sized,
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
Returns the starting position of any comments and whitespace before end
fn comments_between(&self, span: Span<BytePos>) -> CommentIter<'_>ⓘNotable traits for CommentIter<'a>
impl<'a> Iterator for CommentIter<'a> type Item = &'a str;
Notable traits for CommentIter<'a>
impl<'a> Iterator for CommentIter<'a> type Item = &'a str;
Trait Implementations
impl<'a, I, A> ToDoc<'a, Arena<'a, A>, A, &'a (dyn Source + 'a)> for ArcType<I> where
I: AsRef<str> + AsId<I>,
A: Clone,
[src]
I: AsRef<str> + AsId<I>,
A: Clone,
Implementations on Foreign Types
impl Source for ()
[src]
fn new(_: &str) -> Self where
Self: Sized,
[src]
Self: Sized,
fn span(&self) -> Span<BytePos>
[src]
fn src(&self) -> &str
[src]
fn src_slice(&self, _: Span<BytePos>) -> &str
[src]
fn byte_index(&self, _: Line, _: Column) -> Option<BytePos>
[src]
fn line_number_at_byte(&self, _: BytePos) -> Option<Line>
[src]
fn location(&self, _: BytePos) -> Option<Location>
[src]
fn comment_start_before(&self, pos: BytePos) -> BytePos
[src]
fn comments_between(&self, _: Span<BytePos>) -> CommentIter<'_>ⓘNotable traits for CommentIter<'a>
impl<'a> Iterator for CommentIter<'a> type Item = &'a str;
[src]
Notable traits for CommentIter<'a>
impl<'a> Iterator for CommentIter<'a> type Item = &'a str;
Implementors
impl Source for FileMap
[src]
fn new(s: &str) -> Self where
Self: Sized,
[src]
Self: Sized,
fn span(&self) -> Span<BytePos>
[src]
fn src(&self) -> &str
[src]
fn src_slice(&self, span: Span<BytePos>) -> &str
[src]
fn byte_index(&self, line: Line, column: Column) -> Option<BytePos>
[src]
fn line_number_at_byte(&self, pos: BytePos) -> Option<Line>
[src]
fn location(&self, byte: BytePos) -> Option<Location>
[src]
Returns the line and column location of byte
fn comment_start_before(&self, end: BytePos) -> BytePos
[src]
Returns the starting position of any comments and whitespace before end
fn comments_between(&self, span: Span<BytePos>) -> CommentIter<'_>ⓘNotable traits for CommentIter<'a>
impl<'a> Iterator for CommentIter<'a> type Item = &'a str;
[src]
Notable traits for CommentIter<'a>
impl<'a> Iterator for CommentIter<'a> type Item = &'a str;