Relation

Trait Relation 

Source
pub trait Relation: JoinIterable + Projectable {
    // Required methods
    fn header(&self) -> &RelationHeader;
    fn new(header: RelationHeader) -> Self;
    fn from_tuples(header: RelationHeader, tuples: Vec<Vec<usize>>) -> Self;
    fn insert(&mut self, tuple: Vec<usize>) -> bool;
    fn insert_all(&mut self, tuples: Vec<Vec<usize>>) -> bool;
}
Expand description

The Relation trait defines a relational data structure.

Required Methods§

Source

fn header(&self) -> &RelationHeader

Source

fn new(header: RelationHeader) -> Self

Creates a new relation with the specified arity.

Source

fn from_tuples(header: RelationHeader, tuples: Vec<Vec<usize>>) -> Self

Creates a new relation with the specified arity and given tuples.

Source

fn insert(&mut self, tuple: Vec<usize>) -> bool

Inserts a tuple into the relation, returning true if successful and false if otherwise.

Source

fn insert_all(&mut self, tuples: Vec<Vec<usize>>) -> bool

Inserts multiple tuples into the relation, returning true if successful and false if otherwise.

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§