Trait WithLocation

Source
pub trait WithLocation: Sized {
    // Provided methods
    fn at(self, file_id: usize, span: &impl HasCodespan) -> Loc<Self>
       where Self: Sized { ... }
    fn at_loc<T: Sized>(self, loc: &Loc<T>) -> Loc<Self> { ... }
    fn between(
        self,
        file_id: usize,
        start: &impl HasCodespan,
        end: &impl HasCodespan,
    ) -> Loc<Self> { ... }
    fn between_locs<T, Y>(self, start: &Loc<T>, end: &Loc<Y>) -> Loc<Self> { ... }
    fn nowhere(self) -> Loc<Self>
       where Self: Sized { ... }
}

Provided Methods§

Source

fn at(self, file_id: usize, span: &impl HasCodespan) -> Loc<Self>
where Self: Sized,

Source

fn at_loc<T: Sized>(self, loc: &Loc<T>) -> Loc<Self>

Creates a new Loc from another Loc

Source

fn between( self, file_id: usize, start: &impl HasCodespan, end: &impl HasCodespan, ) -> Loc<Self>

Source

fn between_locs<T, Y>(self, start: &Loc<T>, end: &Loc<Y>) -> Loc<Self>

Source

fn nowhere(self) -> Loc<Self>
where Self: Sized,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl WithLocation for bool

Source§

impl WithLocation for i64

Source§

impl WithLocation for u64

Source§

impl WithLocation for u128

Source§

impl WithLocation for ()

Source§

impl WithLocation for usize

Source§

impl WithLocation for String

Source§

impl WithLocation for BigInt

Source§

impl WithLocation for BigUint

Source§

impl<'a> WithLocation for &'a str

Source§

impl<T> WithLocation for Vec<T>

Implementors§