[][src]Struct rls_span::Location

pub struct Location<I: Indexed> {
    pub file: PathBuf,
    pub position: Position<I>,
}

Fields

file: PathBufposition: Position<I>

Methods

impl<I: Indexed> Location<I>[src]

pub fn new<F: Into<PathBuf>>(
    row: Row<I>,
    col: Column<I>,
    file: F
) -> Location<I>
[src]

pub fn from_position<F: Into<PathBuf>>(
    position: Position<I>,
    file: F
) -> Location<I>
[src]

impl Location<OneIndexed>[src]

impl Location<ZeroIndexed>[src]

Trait Implementations

impl<I: Indexed> Clone for Location<I>[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<I: Ord + Indexed> Ord for Location<I>[src]

fn max(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the minimum of two values. Read more

fn clamp(self, min: Self, max: Self) -> Self[src]

🔬 This is a nightly-only experimental API. (clamp)

Restrict a value to a certain interval. Read more

impl<I: Eq + Indexed> Eq for Location<I>[src]

impl<I: PartialOrd + Indexed> PartialOrd<Location<I>> for Location<I>[src]

impl<I: PartialEq + Indexed> PartialEq<Location<I>> for Location<I>[src]

impl<I: Debug + Indexed> Debug for Location<I>[src]

impl<I: Hash + Indexed> Hash for Location<I>[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl<I: Indexed> Serialize for Location<I> where
    I: Serialize
[src]

impl<'de, I: Indexed> Deserialize<'de> for Location<I> where
    I: Deserialize<'de>, 
[src]

Auto Trait Implementations

impl<I> Send for Location<I> where
    I: Send

impl<I> Sync for Location<I> where
    I: Sync

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

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

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]