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; an edit to it or to a term plays from the next block on.
Opening and each edit look store up first: a node it answers plays from its samples, its
own value computing what they miss.
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 async fn edit( &mut self, graph: &Graph, target: &Expr, store: &impl Through, ) -> Result<(), EngineError>
pub async fn add( &mut self, graph: &Graph, term: &Expr, store: &impl Through, ) -> Result<Handle, EngineError>
Sourcepub async fn replace(
&mut self,
graph: &Graph,
__arg2: (Handle, &Expr),
store: &impl Through,
) -> Result<bool, EngineError>
pub async fn replace( &mut self, graph: &Graph, __arg2: (Handle, &Expr), store: &impl Through, ) -> Result<bool, EngineError>
False, and nothing edited, where the stream no longer holds handle.
Sourcepub async fn remove(
&mut self,
handle: Handle,
store: &impl Through,
) -> Result<bool, EngineError>
pub async fn remove( &mut self, handle: Handle, store: &impl Through, ) -> Result<bool, EngineError>
A sounding term is cut where the stream stands, so what it played stays what it was.
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: Vec<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 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 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.