[][src]Struct declarative_dataflow::domain::Domain

pub struct Domain<T: Timestamp + Lattice + TotalOrder> {
    pub attributes: HashMap<Aid, AttributeConfig>,
    pub forward: HashMap<Aid, CollectionIndex<Value, Value, T>>,
    pub reverse: HashMap<Aid, CollectionIndex<Value, Value, T>>,
    pub relations: HashMap<Aid, RelationConfig<T>>,
    pub arrangements: HashMap<Aid, RelationHandle<T>>,
    // some fields omitted
}

A domain manages attributes (and their inputs) that share a timestamp semantics (e.g. come from the same logical source).

Fields

attributes: HashMap<Aid, AttributeConfig>

Configurations for attributes in this domain.

forward: HashMap<Aid, CollectionIndex<Value, Value, T>>

Forward attribute indices eid -> v.

reverse: HashMap<Aid, CollectionIndex<Value, Value, T>>

Reverse attribute indices v -> eid.

relations: HashMap<Aid, RelationConfig<T>>

Configuration for relations in this domain.

arrangements: HashMap<Aid, RelationHandle<T>>

Relation traces.

Methods

impl<T> Domain<T> where
    T: Timestamp + Lattice + TotalOrder + Sub<Output = T> + From<Time>, 
[src]

pub fn new(start_at: T) -> Self[src]

Creates a new domain.

pub fn create_attribute<S: Scope<Timestamp = T>>(
    &mut self,
    name: &str,
    config: AttributeConfig,
    scope: &mut S
) -> Result<(), Error>
[src]

Creates a new collection of (e,v) tuples and indexes it in various ways. Stores forward, and reverse indices, as well as the input handle in the server state.

pub fn create_source<S: Scope<Timestamp = T>>(
    &mut self,
    name: &str,
    datoms: &Stream<S, ((Value, Value), T, isize)>
) -> Result<(), Error>
[src]

Creates attributes from an external datoms source.

pub fn register_arrangement(
    &mut self,
    name: String,
    config: RelationConfig<T>,
    trace: RelationHandle<T>
)
[src]

Inserts a new named relation.

pub fn transact(&mut self, tx_data: Vec<TxData>) -> Result<(), Error>[src]

Transact data into one or more inputs.

pub fn close_input(&mut self, name: String) -> Result<(), Error>[src]

Closes and drops an existing input.

pub fn advance_to(&mut self, next: T) -> Result<(), Error>[src]

Advances the domain to next. Advances all traces accordingly, depending on their configured slack.

pub fn time(&self) -> &T[src]

Reports the current timestamp.

Auto Trait Implementations

impl<T> !Send for Domain<T>

impl<T> !Sync for Domain<T>

Blanket Implementations

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

impl<T> From for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

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

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

The type returned in the event of a conversion error.