pub enum Expression {
Show 23 variants
NamedNode(NamedNode),
Literal(Literal),
Variable(Variable),
Or(Vec<Self>),
And(Vec<Self>),
Equal(Box<Self>, Box<Self>),
SameTerm(Box<Self>, Box<Self>),
Greater(Box<Self>, Box<Self>),
GreaterOrEqual(Box<Self>, Box<Self>),
Less(Box<Self>, Box<Self>),
LessOrEqual(Box<Self>, Box<Self>),
Add(Box<Self>, Box<Self>),
Subtract(Box<Self>, Box<Self>),
Multiply(Box<Self>, Box<Self>),
Divide(Box<Self>, Box<Self>),
UnaryPlus(Box<Self>),
UnaryMinus(Box<Self>),
Not(Box<Self>),
Exists(Box<GraphPattern>),
Bound(Variable),
If(Box<Self>, Box<Self>, Box<Self>),
Coalesce(Vec<Self>),
FunctionCall(Function, Vec<Self>),
}
Expand description
An expression.
Variants§
NamedNode(NamedNode)
Literal(Literal)
Variable(Variable)
Or(Vec<Self>)
And(Vec<Self>)
Equal(Box<Self>, Box<Self>)
RDFterm-equal and all the XSD equalities.
SameTerm(Box<Self>, Box<Self>)
Greater(Box<Self>, Box<Self>)
op:numeric-greater-than and other XSD greater than operators.
GreaterOrEqual(Box<Self>, Box<Self>)
Less(Box<Self>, Box<Self>)
op:numeric-less-than and other XSD greater than operators.
LessOrEqual(Box<Self>, Box<Self>)
Add(Box<Self>, Box<Self>)
op:numeric-add and other XSD additions.
Subtract(Box<Self>, Box<Self>)
op:numeric-subtract and other XSD subtractions.
Multiply(Box<Self>, Box<Self>)
op:numeric-multiply and other XSD multiplications.
Divide(Box<Self>, Box<Self>)
op:numeric-divide and other XSD divides.
UnaryPlus(Box<Self>)
op:numeric-unary-plus and other XSD unary plus.
UnaryMinus(Box<Self>)
op:numeric-unary-minus and other XSD unary minus.
Not(Box<Self>)
Exists(Box<GraphPattern>)
Bound(Variable)
If(Box<Self>, Box<Self>, Box<Self>)
IF.
Coalesce(Vec<Self>)
FunctionCall(Function, Vec<Self>)
A regular function call.
Implementations§
Source§impl Expression
impl Expression
pub fn or_all(args: impl IntoIterator<Item = Self>) -> Self
pub fn and_all(args: impl IntoIterator<Item = Self>) -> Self
pub fn equal(left: Self, right: Self) -> Self
pub fn same_term(left: Self, right: Self) -> Self
pub fn greater(left: Self, right: Self) -> Self
pub fn greater_or_equal(left: Self, right: Self) -> Self
pub fn less(left: Self, right: Self) -> Self
pub fn less_or_equal(left: Self, right: Self) -> Self
pub fn unary_plus(inner: Self) -> Self
pub fn exists(inner: GraphPattern) -> Self
pub fn if_cond(cond: Self, then: Self, els: Self) -> Self
pub fn coalesce(args: Vec<Self>) -> Self
pub fn call(name: Function, args: Vec<Self>) -> Self
pub fn effective_boolean_value(&self) -> Option<bool>
pub fn used_variables(&self) -> HashSet<&Variable>
pub fn lookup_used_variables<'a>( &'a self, callback: &mut impl FnMut(&'a Variable), )
Trait Implementations§
Source§impl Add for Expression
impl Add for Expression
Source§impl BitAnd for Expression
impl BitAnd for Expression
Source§impl BitOr for Expression
impl BitOr for Expression
Source§impl Clone for Expression
impl Clone for Expression
Source§fn clone(&self) -> Expression
fn clone(&self) -> Expression
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 Debug for Expression
impl Debug for Expression
Source§impl Div for Expression
impl Div for Expression
Source§impl From<&Expression> for Expression
impl From<&Expression> for Expression
Source§fn from(expression: &Expression) -> Self
fn from(expression: &Expression) -> Self
Converts to this type from the input type.
Source§impl From<GroundSubject> for Expression
impl From<GroundSubject> for Expression
Source§fn from(value: GroundSubject) -> Self
fn from(value: GroundSubject) -> Self
Converts to this type from the input type.
Source§impl From<GroundTerm> for Expression
impl From<GroundTerm> for Expression
Source§fn from(value: GroundTerm) -> Self
fn from(value: GroundTerm) -> Self
Converts to this type from the input type.
Source§impl From<GroundTermPattern> for Expression
impl From<GroundTermPattern> for Expression
Source§fn from(value: GroundTermPattern) -> Self
fn from(value: GroundTermPattern) -> Self
Converts to this type from the input type.
Source§impl From<GroundTriple> for Expression
impl From<GroundTriple> for Expression
Source§fn from(value: GroundTriple) -> Self
fn from(value: GroundTriple) -> Self
Converts to this type from the input type.
Source§impl From<GroundTriplePattern> for Expression
impl From<GroundTriplePattern> for Expression
Source§fn from(value: GroundTriplePattern) -> Self
fn from(value: GroundTriplePattern) -> Self
Converts to this type from the input type.
Source§impl From<Literal> for Expression
impl From<Literal> for Expression
Source§impl From<NamedNode> for Expression
impl From<NamedNode> for Expression
Source§impl From<NamedNodePattern> for Expression
impl From<NamedNodePattern> for Expression
Source§fn from(value: NamedNodePattern) -> Self
fn from(value: NamedNodePattern) -> Self
Converts to this type from the input type.
Source§impl From<Variable> for Expression
impl From<Variable> for Expression
Source§impl From<bool> for Expression
impl From<bool> for Expression
Source§impl Hash for Expression
impl Hash for Expression
Source§impl Mul for Expression
impl Mul for Expression
Source§impl Neg for Expression
impl Neg for Expression
Source§impl Not for Expression
impl Not for Expression
Source§impl PartialEq for Expression
impl PartialEq for Expression
Source§impl Sub for Expression
impl Sub for Expression
impl Eq for Expression
impl StructuralPartialEq for Expression
Auto Trait Implementations§
impl Freeze for Expression
impl RefUnwindSafe for Expression
impl Send for Expression
impl Sync for Expression
impl Unpin for Expression
impl UnwindSafe for Expression
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