Struct starlark::codemap::CodeMap [−][src]
A data structure recording a source code file for position lookup.
Implementations
impl CodeMap
[src]
pub fn new(filename: String, contents: String) -> CodeMap
[src]
Creates an new CodeMap
.
pub fn get_file(&self) -> &Arc<File>
[src]
Looks up a File
pub fn look_up_pos(&self, pos: Pos) -> Loc
[src]
Gets the file, line, and column represented by a Pos
.
pub fn look_up_span(&self, span: Span) -> SpanLoc
[src]
Gets the file and its line and column ranges represented by a Span
.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for CodeMap
impl Send for CodeMap
impl Sync for CodeMap
impl Unpin for CodeMap
impl UnwindSafe for CodeMap
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> TEq<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,