Struct owoof::retrieve::Pattern[][src]

pub struct Pattern<'a, V> {
    pub entity: Either<Variable<'a>, V>,
    pub attribute: Either<Variable<'a>, V>,
    pub value: Either<Variable<'a>, V>,
}
Expand description

A data structure for specifying high-level constraints with NamedNetwork::add_pattern.

FYI: entity and attribute should use crate::Entity and crate::Attribute respectively instead, but it’s a bit convenient for all the fields to be homogeneous or whatever so you can add them to a Vec or iterate over them or otherwise interact with them all the same.

Can be parsed but must borrow the input string because Variables always borrow. See crate::BorrowedParse about that. Also requires the serde_json feature to parse a Value.

Fields

entity: Either<Variable<'a>, V>attribute: Either<Variable<'a>, V>value: Either<Variable<'a>, V>

Trait Implementations

Formats the value using the given formatter. Read more

Requires the serde_json feature.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.