Skip to main content

Relation

Trait Relation 

Source
pub trait Relation: Sized {
    type Tuple;

    // Required methods
    fn relation_name() -> &'static str;
    fn to_tuple(self) -> Self::Tuple;
}
Expand description

Trait implemented by every generated input relation struct.

The generated DatalogBatchEngine calls Relation::to_tuple at insert time to convert user-facing structs (e.g. Edge { x: 1, y: 2 }) into the internal differential-dataflow tuple representation.

You don’t implement this trait manually — flowlog-build generates an impl for each .input relation declared in your .dl program.

Required Associated Types§

Source

type Tuple

The internal DD tuple type (e.g. (i32, i32)).

Required Methods§

Source

fn relation_name() -> &'static str

Relation name (lowercase), matching the DD input session key.

Source

fn to_tuple(self) -> Self::Tuple

Convert self into the internal tuple layout.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§