pub struct FullTextDocument {
pub uri: Url,
pub language_id: String,
pub version: i64,
pub text: String,
/* private fields */
}
Fields§
§uri: Url
§language_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§
Source§impl FullTextDocument
impl FullTextDocument
pub fn new( uri: Url, language_id: String, version: i64, text: String, ) -> FullTextDocument
pub fn update( &mut self, changes: Vec<TextDocumentContentChangeEvent>, version: i64, )
pub fn transform_offset_to_byte_offset( &self, start_offset: usize, end_offset: usize, ) -> (usize, usize)
pub fn position_at(&mut self, offset: u32) -> Position
pub fn line_count(&mut self) -> usize
pub fn is_incremental(event: &TextDocumentContentChangeEvent) -> bool
pub fn is_full(event: &TextDocumentContentChangeEvent) -> bool
pub fn get_line_offsets(&mut self) -> &mut Vec<usize>
pub fn offset_at(&mut self, position: Position) -> usize
Trait Implementations§
Source§impl Clone for FullTextDocument
impl Clone for FullTextDocument
Source§fn clone(&self) -> FullTextDocument
fn clone(&self) -> FullTextDocument
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for FullTextDocument
impl RefUnwindSafe for FullTextDocument
impl Send for FullTextDocument
impl Sync for FullTextDocument
impl Unpin for FullTextDocument
impl UnwindSafe for FullTextDocument
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more