pub struct TextDocument { /* private fields */ }Implementations§
Source§impl TextDocument
impl TextDocument
pub fn new(contents: String, version: i32) -> Self
pub fn with_language_id(self, language_id: &str) -> Self
pub fn contents(&self) -> &str
pub fn index(&self) -> &LineIndex
pub fn version(&self) -> i32
pub fn language_id(&self) -> Option<LanguageId>
pub fn apply_changes( &mut self, changes: Vec<TextDocumentContentChangeEvent>, new_version: i32, encoding: PositionEncoding, )
pub fn update_version(&mut self, new_version: i32)
Trait Implementations§
Source§impl Clone for TextDocument
impl Clone for TextDocument
Source§fn clone(&self) -> TextDocument
fn clone(&self) -> TextDocument
Returns a duplicate 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 TextDocument
impl RefUnwindSafe for TextDocument
impl Send for TextDocument
impl Sync for TextDocument
impl Unpin for TextDocument
impl UnsafeUnpin for TextDocument
impl UnwindSafe for TextDocument
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