Op

Enum Op 

Source
pub enum Op {
Show 14 variants State, Session, Presence, Const, Pointwise { code: Core, }, MapValues, MapList { f: Fun, }, FilterList { f: Fun, }, SortBy { f: Fun, }, Concat, FlatMap { f: Fun, }, Flatten, Count, IsEmpty,
}
Expand description

What one operator does.

Variants§

§

State

The durable accumulator, supplied by the caller. The plan’s one source.

§

Session

The subscriber’s Session. Constant for the life of one subscription, which is what makes everything not downstream of it shareable (§5.3).

§

Presence

Who is connected — presence(), supplied by the caller like the other two sources.

Everything downstream of it is per subscriber even though the value is the same for everybody, and the reason is a clock rather than a privacy rule: the shared dataflow is versioned by the log’s seq (crate::engine::SharedDataflow), and presence moves when the log does not. Sharing it would need a second version, which is docs/96 §96.8’s first unbuilt item.

§

Const

A closed expression, evaluated once when the plan is prepared.

§

Pointwise

Recomputed when an input changed. Carries a Lam over its inputs.

Fields

§code: Core
§

MapValues

map_values(m) — where every delta in a Beck program is born, because the accumulator is a value and a plan consumes changes. crate::pmap::PMap::diff is the conversion.

§

MapList

Fields

§

FilterList

Fields

§

SortBy

Fields

§

Concat

concat_lists([a, b, …]) — a union of delta streams, one per named part.

§

FlatMap

concat_lists(map_list(xs, f)) as one operator — what crate::fuse makes of the pair, and the shape every for loop in a ui: block has. Applies f and takes the resulting list apart in one step, so the list of lists in between is never arranged.

Fields

§

Flatten

concat_lists(xs) where xs is itself a collection of lists: a flatten.

A for loop in a ui: block lowers to concat_lists(map_list(todos, …)) and crate::fuse turns that pair into Op::FlatMap, so this is what remains when the collection of lists came from somewhere else — a map_values whose values are lists, a sort_by, or a map_list the fusion refused.

§

Count

list_len — §3.8’s remaining. The arrangement’s size, so ±1 per delta and never a recount; and it does not force its input to be materialised.

§

IsEmpty

Implementations§

Source§

impl Op

Source

pub fn name(&self) -> &'static str

Source

pub fn maintained(&self) -> bool

Whether this operator is maintained by delta rather than recomputed.

Source

pub fn is_source(&self) -> bool

Whether this is an input to the dataflow rather than a step in it.

Source

pub fn key(&self) -> &'static str

What orders this operator’s arrangement — the table in this module’s own documentation, as a sentence, so beck explain query states the thing that makes the output order a consequence of the plan rather than of a sort at the end.

Source

pub fn is_arrangement(&self) -> bool

Whether this operator’s output is an arrangement rather than a value.

Trait Implementations§

Source§

impl Clone for Op

Source§

fn clone(&self) -> Op

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Op

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Op

§

impl RefUnwindSafe for Op

§

impl Send for Op

§

impl Sync for Op

§

impl Unpin for Op

§

impl UnwindSafe for Op

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.