pub struct VariableContext {
pub next_index: VariableId,
}Expand description
Context for creating variables in a query. The context keeps track of the next index to assign to a variable. This allows for the creation of new anonymous variables in higher-level query languages.
Fields§
§next_index: VariableIdThe index that will be assigned to the next variable.
Implementations§
Source§impl VariableContext
impl VariableContext
Sourcepub fn next_variable<T: ValueSchema>(&mut self) -> Variable<T>
pub fn next_variable<T: ValueSchema>(&mut self) -> Variable<T>
Create a new variable. The variable is assigned the next available index.
Panics if the number of variables exceeds 128.
This method is usually not called directly, but rather through typed query language macros like find!.
Trait Implementations§
Source§impl Debug for VariableContext
impl Debug for VariableContext
Auto Trait Implementations§
impl Freeze for VariableContext
impl RefUnwindSafe for VariableContext
impl Send for VariableContext
impl Sync for VariableContext
impl Unpin for VariableContext
impl UnsafeUnpin for VariableContext
impl UnwindSafe for VariableContext
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> 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