pub enum Constraint {
Show 18 variants
Isa {
instance: ConstraintVertex,
type: ConstraintVertex,
exactness: ConstraintExactness,
},
Has {
owner: ConstraintVertex,
attribute: ConstraintVertex,
exactness: ConstraintExactness,
},
Links {
relation: ConstraintVertex,
player: ConstraintVertex,
role: ConstraintVertex,
exactness: ConstraintExactness,
},
Sub {
subtype: ConstraintVertex,
supertype: ConstraintVertex,
exactness: ConstraintExactness,
},
Owns {
owner: ConstraintVertex,
attribute: ConstraintVertex,
exactness: ConstraintExactness,
},
Relates {
relation: ConstraintVertex,
role: ConstraintVertex,
exactness: ConstraintExactness,
},
Plays {
player: ConstraintVertex,
role: ConstraintVertex,
exactness: ConstraintExactness,
},
FunctionCall {
name: String,
assigned: Vec<ConstraintVertex>,
arguments: Vec<ConstraintVertex>,
},
Expression {
text: String,
assigned: ConstraintVertex,
arguments: Vec<ConstraintVertex>,
},
Is {
lhs: ConstraintVertex,
rhs: ConstraintVertex,
},
Iid {
concept: ConstraintVertex,
iid: IID,
},
Comparison {
lhs: ConstraintVertex,
rhs: ConstraintVertex,
comparator: Comparator,
},
Kind {
kind: Kind,
type: ConstraintVertex,
},
Label {
type: ConstraintVertex,
label: String,
},
Value {
attribute_type: ConstraintVertex,
value_type: ValueType,
},
Or {
branches: Vec<ConjunctionID>,
},
Not {
conjunction: ConjunctionID,
},
Try {
conjunction: ConjunctionID,
},
}Expand description
A representation of a TypeQL constraint.
Variants§
Isa
Has
Links
Fields
§
relation: ConstraintVertex§
player: ConstraintVertex§
role: ConstraintVertex§
exactness: ConstraintExactnessSub
Owns
Relates
Plays
FunctionCall
let
Expression
let [$y]
Is
Iid
$y iid 0x1f0005000000000000012f
Comparison
$x < 5
Kind
entity person
Label
Value
<attribute_type> value <value_type> e.g. $t value string
Or
{ <branches[0]> } or { <branches[1]> } [or …]
Fields
§
branches: Vec<ConjunctionID>Index into Pipeline.conjunctions
Not
not {
Fields
§
conjunction: ConjunctionIDIndex into Pipeline.conjunctions
Try
try {
Fields
§
conjunction: ConjunctionIDIndex into Pipeline.conjunctions
Trait Implementations§
Source§impl Clone for Constraint
impl Clone for Constraint
Source§fn clone(&self) -> Constraint
fn clone(&self) -> Constraint
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for Constraint
impl RefUnwindSafe for Constraint
impl Send for Constraint
impl Sync for Constraint
impl Unpin for Constraint
impl UnwindSafe for Constraint
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request