pub struct Document {
pub uri: Url,
pub version: i32,
/* private fields */
}Fields§
§uri: Url§version: i32Implementations§
Source§impl Document
impl Document
pub fn new(uri: Url, version: i32, text: String) -> Self
pub fn text(&self) -> &str
pub fn apply_changes(&mut self, changes: Vec<TextDocumentContentChangeEvent>)
pub fn range_from_byte_range(&self, start: usize, end: usize) -> Range
pub fn position_at(&self, offset: usize) -> Position
pub fn offset_at(&self, position: Position) -> usize
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Document
impl RefUnwindSafe for Document
impl Send for Document
impl Sync for Document
impl Unpin for Document
impl UnsafeUnpin for Document
impl UnwindSafe for Document
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