Skip to main content

Stream

Struct Stream 

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

A target rendered block by block off one table. The target may read @notes, the sum of the terms added under handles. A node the store answers plays from its samples. A hit is looked up once; a node reading the stream’s own note sum never, as no store holds one.

Implementations§

Source§

impl Stream

Source

pub async fn open( graph: &Graph, target: &Expr, config: StreamConfig, cache: Option<&Cache>, store: &impl Through, ) -> Result<Stream, EngineError>

Source

pub fn exprs(&self) -> impl Iterator<Item = &Expr>

Source

pub async fn fetch(&mut self, store: &impl Through)

Loads the stored samples the next second reads; a block reading one not loaded has it computed, or, live, started silent where not ready.

Source

pub fn wanted(&self) -> Vec<(Arc<Stored>, Extent)>

What fetch reads, for a caller reading it as the stream plays.

Source

pub fn took(&mut self, key: Hash, samples: &[Buffer])

Source

pub fn read(&mut self, at: i64, n: usize) -> Result<Option<Block>, EngineError>

n samples from sample at, cut where the stream ends; None from there on. An at behind the stream is refused; one past it skips there, computing through the span, or, live, as go_live says.

Source

pub fn go_live(&mut self)

An edited node with no state there, or one a read skips past, starts silent there, never computing its past, and is named in dropped; a formula reads on exactly.

Source

pub fn dropped(&self) -> Vec<&str>

The latest nodes a live edit started silent, of counts().dropped.

Source

pub fn counts(&self) -> Counts

Source

pub fn evaluated(&self, node: &str) -> Vec<Extent>

Every segment of its own clock the stream computed of node’s value, in order.

Source

pub fn pruned(&self) -> Pruned

Source

pub fn landed(&self, handle: Handle) -> Option<i64>

Source

pub fn position(&self) -> i64

Source

pub fn work(&self) -> Work

Source

pub fn stats(&self) -> CacheStats

Source

pub fn held_bytes(&self) -> usize

The bytes its values hold, samples and state.

Source

pub fn end(&self) -> Option<i64>

Source

pub fn width(&self) -> usize

Source

pub fn config(&self) -> &StreamConfig

Auto Trait Implementations§

§

impl !Freeze for Stream

§

impl !RefUnwindSafe for Stream

§

impl !Sync for Stream

§

impl !UnwindSafe for Stream

§

impl Send for Stream

§

impl Unpin for Stream

§

impl UnsafeUnpin for Stream

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 = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

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.