pub struct ThingStatement {
    pub variable: ConceptVariable,
    pub iid: Option<IIDConstraint>,
    pub isa: Option<IsaConstraint>,
    pub has: Vec<HasConstraint>,
    pub predicate: Option<Predicate>,
    pub relation: Option<RelationConstraint>,
}

Fields§

§variable: ConceptVariable§iid: Option<IIDConstraint>§isa: Option<IsaConstraint>§has: Vec<HasConstraint>§predicate: Option<Predicate>§relation: Option<RelationConstraint>

Implementations§

source§

impl ThingStatement

source

pub fn new(variable: ConceptVariable) -> ThingStatement

source

pub fn owner(&self) -> VariableRef<'_>

source

pub fn variables(&self) -> Box<dyn Iterator<Item = VariableRef<'_>> + '_>

source

pub fn constrain_has(self, has: HasConstraint) -> ThingStatement

source

pub fn constrain_iid(self, iid: IIDConstraint) -> ThingStatement

source

pub fn constrain_isa(self, isa: IsaConstraint) -> ThingStatement

source

pub fn constrain_predicate(self, predicate: Predicate) -> ThingStatement

source

pub fn constrain_relation(self, relation: RelationConstraint) -> ThingStatement

Trait Implementations§

source§

impl Clone for ThingStatement

source§

fn clone(&self) -> ThingStatement

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ThingStatement

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for ThingStatement

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<ConceptVariable> for ThingStatement

source§

fn from(variable: ConceptVariable) -> Self

Converts to this type from the input type.
source§

impl From<ThingStatement> for Pattern

source§

fn from(statement: ThingStatement) -> Self

Converts to this type from the input type.
source§

impl From<ThingStatement> for Statement

source§

fn from(x: ThingStatement) -> Self

Converts to this type from the input type.
source§

impl PartialEq for ThingStatement

source§

fn eq(&self, other: &ThingStatement) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Validatable for ThingStatement

source§

fn validate(&self) -> Result

source§

fn validated(self) -> Result<Self>

source§

impl Writable for ThingStatement

source§

impl Eq for ThingStatement

source§

impl StructuralPartialEq for ThingStatement

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<U> ThingStatementBuilder for U
where U: Into<ThingStatement>,

source§

fn has(self, has: impl Into<HasConstraint>) -> ThingStatement

source§

fn rel(self, value: impl Into<RolePlayerConstraint>) -> ThingStatement

source§

fn relation(self, relation: impl Into<RelationConstraint>) -> ThingStatement

source§

fn iid<T>(self, iid: T) -> ThingStatement
where T: Into<IIDConstraint>,

source§

fn isa(self, isa: impl Into<IsaConstraint>) -> ThingStatement

source§

fn predicate(self, predicate: impl Into<Predicate>) -> ThingStatement

source§

fn eq(self, value: impl Into<Value>) -> ThingStatement

source§

fn neq(self, value: impl Into<Value>) -> ThingStatement

source§

fn gt(self, value: impl Into<Value>) -> ThingStatement

source§

fn gte(self, value: impl Into<Value>) -> ThingStatement

source§

fn lt(self, value: impl Into<Value>) -> ThingStatement

source§

fn lte(self, value: impl Into<Value>) -> ThingStatement

source§

fn contains(self, string: impl Into<String>) -> ThingStatement

source§

fn like(self, string: impl Into<String>) -> ThingStatement

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.