Struct starlark::codemap::CodeMap[][src]

pub struct CodeMap { /* fields omitted */ }

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

impl Debug for CodeMap[src]

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> TEq<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.