pub struct Variable<T: ValueSchema> {
pub index: VariableId,
/* private fields */
}Expand description
A placeholder for unknowns in a query.
Within the query engine each variable is identified by an integer,
which can be accessed via the index property.
Variables also have an associated type which is used to parse the Values
found by the query engine.
Fields§
§index: VariableIdThe integer index identifying this variable in the Binding.
Implementations§
Source§impl<T: ValueSchema> Variable<T>
impl<T: ValueSchema> Variable<T>
Source§impl<T: ValueSchema> Variable<T>
impl<T: ValueSchema> Variable<T>
Sourcepub fn is(self, constant: Value<T>) -> ConstantConstraint
pub fn is(self, constant: Value<T>) -> ConstantConstraint
Create a constraint so that only a specific value can be assigned to the variable.
Trait Implementations§
Source§impl<T: ValueSchema> Clone for Variable<T>
impl<T: ValueSchema> Clone for Variable<T>
impl<T: ValueSchema> Copy for Variable<T>
Auto Trait Implementations§
impl<T> Freeze for Variable<T>
impl<T> RefUnwindSafe for Variable<T>where
T: RefUnwindSafe,
impl<T> Send for Variable<T>where
T: Send,
impl<T> Sync for Variable<T>where
T: Sync,
impl<T> Unpin for Variable<T>where
T: Unpin,
impl<T> UnsafeUnpin for Variable<T>
impl<T> UnwindSafe for Variable<T>where
T: UnwindSafe,
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§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