[][src]Struct lsp_text_document::FullTextDocument

pub struct FullTextDocument {
    pub uri: Url,
    pub language_id: String,
    pub version: i64,
    pub text: String,
    // some fields omitted
}

Fields

uri: Urllanguage_id: String

The text document's language identifier.

version: i64

The version number of this document (it will strictly increase after each change, including undo/redo).

text: String

The content of the opened text document.

Implementations

impl FullTextDocument[src]

pub fn new(
    uri: Url,
    language_id: String,
    version: i64,
    text: String
) -> FullTextDocument
[src]

pub fn update(
    &mut self,
    changes: Vec<TextDocumentContentChangeEvent>,
    version: i64
)
[src]

pub fn transform_offset_to_byte_offset(
    &self,
    start_offset: usize,
    end_offset: usize
) -> (usize, usize)
[src]

pub fn position_at(&mut self, offset: u32) -> Position[src]

pub fn line_count(&mut self) -> usize[src]

pub fn is_incremental(event: &TextDocumentContentChangeEvent) -> bool[src]

pub fn is_full(event: &TextDocumentContentChangeEvent) -> bool[src]

pub fn get_line_offsets(&mut self) -> &mut Vec<usize>[src]

pub fn offset_at(&mut self, position: Position) -> usize[src]

Trait Implementations

impl Clone for FullTextDocument[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> 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.