[][src]Struct tamasfe_lsp_types::Position

pub struct Position {
    pub line: u32,
    pub character: u32,
}

Position in a text document expressed as zero-based line and character offset. A position is between two characters like an 'insert' cursor in a editor.

Fields

line: u32

Line position in a document (zero-based).

character: u32

Character offset on a line in a document (zero-based). Assuming that the line is represented as a string, the character value represents the gap between the character and character + 1.

If the character value is greater than the line length it defaults back to the line length.

Implementations

impl Position[src]

pub fn new(line: u32, character: u32) -> Position[src]

Trait Implementations

impl Clone for Position[src]

impl Copy for Position[src]

impl Debug for Position[src]

impl Default for Position[src]

impl<'de> Deserialize<'de> for Position[src]

impl Eq for Position[src]

impl Ord for Position[src]

impl PartialEq<Position> for Position[src]

impl PartialOrd<Position> for Position[src]

impl Serialize for Position[src]

impl StructuralEq for Position[src]

impl StructuralPartialEq for Position[src]

Auto Trait Implementations

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[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.