pub struct GritFunctionDefinition<Q: QueryContext> {
pub name: String,
pub scope: usize,
pub params: Vec<(String, Variable)>,
pub local_vars: Vec<usize>,
pub function: Predicate<Q>,
}Fields§
§name: String§scope: usize§params: Vec<(String, Variable)>§local_vars: Vec<usize>§function: Predicate<Q>Implementations§
Trait Implementations§
source§impl<Q: Clone + QueryContext> Clone for GritFunctionDefinition<Q>
impl<Q: Clone + QueryContext> Clone for GritFunctionDefinition<Q>
source§fn clone(&self) -> GritFunctionDefinition<Q>
fn clone(&self) -> GritFunctionDefinition<Q>
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 moresource§impl<Q: Debug + QueryContext> Debug for GritFunctionDefinition<Q>
impl<Q: Debug + QueryContext> Debug for GritFunctionDefinition<Q>
source§impl<Q: QueryContext> FunctionDefinition<Q> for GritFunctionDefinition<Q>
impl<Q: QueryContext> FunctionDefinition<Q> for GritFunctionDefinition<Q>
fn call<'a>( &'a self, state: &mut State<'a, Q>, context: &'a Q::ExecContext<'a>, args: &'a [Option<Pattern<Q>>], logs: &mut AnalysisLogs, ) -> GritResult<FuncEvaluation<'_, Q>>
Auto Trait Implementations§
impl<Q> Freeze for GritFunctionDefinition<Q>
impl<Q> RefUnwindSafe for GritFunctionDefinition<Q>where
<Q as QueryContext>::LeafNodePattern: RefUnwindSafe,
<Q as QueryContext>::CodeSnippet: RefUnwindSafe,
<Q as QueryContext>::NodePattern: RefUnwindSafe,
impl<Q> Send for GritFunctionDefinition<Q>where
<Q as QueryContext>::LeafNodePattern: Send,
<Q as QueryContext>::CodeSnippet: Send,
<Q as QueryContext>::NodePattern: Send,
impl<Q> Sync for GritFunctionDefinition<Q>where
<Q as QueryContext>::LeafNodePattern: Sync,
<Q as QueryContext>::CodeSnippet: Sync,
<Q as QueryContext>::NodePattern: Sync,
impl<Q> Unpin for GritFunctionDefinition<Q>
impl<Q> UnwindSafe for GritFunctionDefinition<Q>where
<Q as QueryContext>::LeafNodePattern: UnwindSafe + RefUnwindSafe,
<Q as QueryContext>::CodeSnippet: UnwindSafe + RefUnwindSafe,
<Q as QueryContext>::NodePattern: UnwindSafe + RefUnwindSafe,
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more