ExampleSemantics

Struct ExampleSemantics 

Source
pub struct ExampleSemantics;

Trait Implementations§

Source§

impl Semantics for ExampleSemantics

Source§

type NodeConcrete = NodeValue

A data graph’s nodes contain values of this type. PL analogy: values.
Source§

type NodeAbstract = NodeType

An operation can define patterns for nodes using this type. PL analogy: types.
Source§

type EdgeConcrete = String

A data graph’s edges contain values of this type. PL analogy: values.
Source§

type EdgeAbstract = EdgeType

An operation can define patterns for edges using this type. PL analogy: types.
Source§

type NodeMatcher = NodeMatcher

The specific matching process for nodes.
Source§

type EdgeMatcher = EdgeMatcher

The specific matching process for edges.
Source§

type NodeJoin = NodeJoiner

The specific join process for nodes.
Source§

type EdgeJoin = EdgeJoiner

The specific join process for edges.
Source§

type NodeConcreteToAbstract = NodeConcreteToAbstract

Source§

type EdgeConcreteToAbstract = EdgeConcreteToAbstract

Source§

type BuiltinOperation = ExampleOperation

Builtin operations are of this type.
Source§

type BuiltinQuery = ExampleQuery

Queries are of this type
Source§

fn top_node_abstract() -> Option<Self::NodeAbstract>

Returns the top node of the abstract graph, if the semantics defines one. This is mainly used for added ergonomics on LibBuiltinOperations, since they require explicit parameters. If a semantics defines a top abstract node value, some of the LibBuiltinOperations can default to that abstract value.
Source§

fn top_edge_abstract() -> Option<Self::EdgeAbstract>

Returns the top edge of the abstract graph, if the semantics defines one. This is mainly used for added ergonomics on LibBuiltinOperations, since they require explicit parameters. If a semantics defines a top abstract edge value, some of the LibBuiltinOperations can default to that abstract value.
Source§

fn new_concrete_graph() -> ConcreteGraph<Self>

Source§

fn new_abstract_graph() -> AbstractGraph<Self>

Source§

fn join_edges( a: &Self::EdgeAbstract, b: &Self::EdgeAbstract, ) -> Option<Self::EdgeAbstract>

Source§

fn join_nodes( a: &Self::NodeAbstract, b: &Self::NodeAbstract, ) -> Option<Self::NodeAbstract>

Source§

fn concrete_to_abstract(c: &ConcreteGraph<Self>) -> AbstractGraph<Self>

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<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

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>,

Source§

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.