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
impl Stream
pub async fn open( graph: &Graph, target: &Expr, config: StreamConfig, cache: Option<&Cache>, store: &impl Through, ) -> Result<Stream, EngineError>
pub fn exprs(&self) -> impl Iterator<Item = &Expr>
Sourcepub async fn fetch(&mut self, store: &impl Through)
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.
Sourcepub fn wanted(&self) -> Vec<(Arc<Stored>, Extent)>
pub fn wanted(&self) -> Vec<(Arc<Stored>, Extent)>
What fetch reads, for a caller reading it as the stream plays.
pub fn took(&mut self, key: Hash, samples: &[Buffer])
Sourcepub fn next_block(&mut self) -> Result<Option<Block>, EngineError>
pub fn next_block(&mut self) -> Result<Option<Block>, EngineError>
The next block, cut where the stream ends; None from there on.
Sourcepub fn go_live(&mut self)
pub fn go_live(&mut self)
An edited node with no state there starts silent, never computing its past.
Sourcepub fn dropped(&self) -> Vec<&str>
pub fn dropped(&self) -> Vec<&str>
The latest nodes a live edit started silent, of counts().dropped.
pub fn counts(&self) -> Counts
Sourcepub fn evaluated(&self, node: &str) -> Vec<Extent>
pub fn evaluated(&self, node: &str) -> Vec<Extent>
Every segment of its own clock the stream computed of node’s value, in order.
pub fn pruned(&self) -> Pruned
pub fn landed(&self, handle: Handle) -> Option<i64>
pub fn position(&self) -> i64
pub fn work(&self) -> Work
pub fn stats(&self) -> CacheStats
Sourcepub fn held_bytes(&self) -> usize
pub fn held_bytes(&self) -> usize
The bytes its values hold, samples and state.