Struct tree_sitter_graph::functions::Functions
source · pub struct Functions { /* private fields */ }
Expand description
A library of named functions.
Implementations§
source§impl Functions
impl Functions
sourcepub fn stdlib() -> Functions
pub fn stdlib() -> Functions
Returns the standard library of functions, as defined in the language reference.
sourcepub fn add<F>(&mut self, name: Identifier, function: F)
pub fn add<F>(&mut self, name: Identifier, function: F)
Adds a new function to this library.
sourcepub fn call(
&self,
name: &Identifier,
graph: &mut Graph<'_>,
source: &str,
parameters: &mut dyn Parameters
) -> Result<Value, ExecutionError>
pub fn call( &self, name: &Identifier, graph: &mut Graph<'_>, source: &str, parameters: &mut dyn Parameters ) -> Result<Value, ExecutionError>
Calls a named function, returning an error if there is no function with that name.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Functions
impl Send for Functions
impl Sync for Functions
impl Unpin for Functions
impl !UnwindSafe for Functions
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