Struct starlark::codemap::FileSpanRef
source · pub struct FileSpanRef<'a> {
pub file: &'a CodeMap,
pub span: Span,
}
Expand description
A file, and a line and column range within it.
Fields§
§file: &'a CodeMap
§span: Span
Implementations§
source§impl<'a> FileSpanRef<'a>
impl<'a> FileSpanRef<'a>
sourcepub fn to_file_span(self) -> FileSpan
pub fn to_file_span(self) -> FileSpan
Convert to the owned span.
sourcepub fn resolve_span(&self) -> ResolvedSpan
pub fn resolve_span(&self) -> ResolvedSpan
Resolve span offsets to lines and columns.
sourcepub fn source_span(self) -> &'a str
pub fn source_span(self) -> &'a str
Resolve the span.
Trait Implementations§
source§impl<'a> Clone for FileSpanRef<'a>
impl<'a> Clone for FileSpanRef<'a>
source§fn clone(&self) -> FileSpanRef<'a>
fn clone(&self) -> FileSpanRef<'a>
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<'a> Debug for FileSpanRef<'a>
impl<'a> Debug for FileSpanRef<'a>
source§impl<'a> Display for FileSpanRef<'a>
impl<'a> Display for FileSpanRef<'a>
source§impl<'a> PartialEq for FileSpanRef<'a>
impl<'a> PartialEq for FileSpanRef<'a>
source§fn eq(&self, other: &FileSpanRef<'a>) -> bool
fn eq(&self, other: &FileSpanRef<'a>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<'a> Copy for FileSpanRef<'a>
impl<'a> Eq for FileSpanRef<'a>
impl<'a> StructuralPartialEq for FileSpanRef<'a>
Auto Trait Implementations§
impl<'a> RefUnwindSafe for FileSpanRef<'a>
impl<'a> Send for FileSpanRef<'a>
impl<'a> Sync for FileSpanRef<'a>
impl<'a> Unpin for FileSpanRef<'a>
impl<'a> UnwindSafe for FileSpanRef<'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
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.