[][src]Struct ddbug_parser::Source

pub struct Source<'input> { /* fields omitted */ }

A source location.

Implementations

impl<'input> Source<'input>[src]

pub fn directory(&self) -> Option<&str>[src]

The directory.

This may be absolute, or relative to the working directory of the unit.

pub fn file(&self) -> Option<&str>[src]

The file name.

pub fn is_none(&self) -> bool[src]

Return true if there is no file name.

pub fn is_some(&self) -> bool[src]

Return true if there is a file name.

pub fn path(&self, unit: &Unit<'_>) -> Option<String>[src]

The complete file path.

pub fn line(&self) -> u32[src]

The source line number.

0 means unknown line number.

pub fn column(&self) -> u32[src]

The source column number.

0 means unknown column number.

Trait Implementations

impl<'input> Clone for Source<'input>[src]

impl<'input> Debug for Source<'input>[src]

impl<'input> Default for Source<'input>[src]

Auto Trait Implementations

impl<'input> RefUnwindSafe for Source<'input>[src]

impl<'input> Send for Source<'input>[src]

impl<'input> Sync for Source<'input>[src]

impl<'input> Unpin for Source<'input>[src]

impl<'input> UnwindSafe for Source<'input>[src]

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.