[−][src]Struct ddbug_parser::Source
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]
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> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut 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>,