Reader

Struct Reader 

Source
pub struct Reader { /* private fields */ }
Expand description

A reader of a SharedDataflow’s arrangements that renders nothing.

The read model’s half of §5.3’s cut: the operators that do not read the session are exactly the ones a client with no session can be shown (crate::read). Holding one keeps the arrangements from being released; dropping it is how a SQL connection ends.

Implementations§

Source§

impl Reader

Source

pub fn read( &self, state: &Value, version: u64, id: OpId, ) -> Result<Vec<Value>, ExecError>

One shared operator’s output, as the rows it stands for, at version.

Advances the shared prefix first, by the same path a rendering subscriber takes — so a query issued after an ack sees that ack’s event, and a query issued when nothing is subscribed pays for the advance nobody else has paid for. That is the read model’s whole freshness story: there is no projection to lag behind.

An arrangement answers its entries in key order, which is the order the plan gives it and therefore the order the page renders in. A value answers itself, once.

Trait Implementations§

Source§

impl Drop for Reader

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl Freeze for Reader

§

impl RefUnwindSafe for Reader

§

impl Send for Reader

§

impl Sync for Reader

§

impl Unpin for Reader

§

impl UnwindSafe for Reader

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> 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, 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.