pub struct Document {
pub content: Rope,
pub tree: Option<Tree>,
pub uri: Url,
pub version: i32,
}Fields§
§content: Rope§tree: Option<Tree>§uri: Url§version: i32Implementations§
Source§impl Document
impl Document
pub fn aliases(&self) -> Vec<Alias>
Sourcepub fn apply_change(
&mut self,
params: DidChangeTextDocumentParams,
) -> Result<(), Error>
pub fn apply_change( &mut self, params: DidChangeTextDocumentParams, ) -> Result<(), Error>
pub fn attributes(&self) -> Vec<Attribute>
pub fn find_function(&self, name: &str) -> Option<Function>
pub fn find_recipe(&self, name: &str) -> Option<Recipe>
pub fn find_variable(&self, name: &str) -> Option<Variable>
pub fn function_calls(&self) -> Vec<FunctionCall>
pub fn functions(&self) -> Vec<Function>
pub fn get_node_text(&self, node: &Node<'_>) -> String
pub fn imports(&self) -> Vec<Import>
pub fn modules(&self) -> Vec<Module>
Sourcepub fn node_at_position(&self, position: Position) -> Option<Node<'_>>
pub fn node_at_position(&self, position: Position) -> Option<Node<'_>>
Returns the syntax tree node at the given LSP Position.
pub fn recipes(&self) -> Vec<Recipe>
pub fn settings(&self) -> Vec<Setting>
pub fn variables(&self) -> Vec<Variable>
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