[][src]Struct codd::expression::Relation

pub struct Relation<T> where
    T: Tuple
{ /* fields omitted */ }

Is an expression corresponding to a relation with tuples of type T that is identified by a name.

Example:

use codd::{Database, expression::Relation};

let mut db = Database::new();
let r = db.add_relation("R").unwrap();

db.insert(&r, vec![0, 1, 2, 3].into()).unwrap(); // insert into the relation instance

assert_eq!(vec![0, 1, 2, 3], db.evaluate(&r).unwrap().into_tuples());

Implementations

impl<T> Relation<T> where
    T: Tuple
[src]

pub fn new<S>(name: S) -> Self where
    S: Into<String>, 
[src]

Creates a new Relation with a given name.

pub fn name(&self) -> &str[src]

Returns a reference to the name by which the relation is identified.

Trait Implementations

impl<T: Clone> Clone for Relation<T> where
    T: Tuple
[src]

impl<T: Debug> Debug for Relation<T> where
    T: Tuple
[src]

impl<T> Expression<T> for Relation<T> where
    T: Tuple + 'static, 
[src]

impl<T: Tuple> From<Relation<T>> for Mono<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for Relation<T> where
    T: RefUnwindSafe

impl<T> Send for Relation<T> where
    T: Send

impl<T> Sync for Relation<T> where
    T: Sync

impl<T> Unpin for Relation<T> where
    T: Unpin

impl<T> UnwindSafe for Relation<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, E> IntoExpression<T, E> for E where
    E: Expression<T>,
    T: Tuple
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.