pub trait Flushable {
// Required method
fn flush(&mut self) -> Result<(), FlushError>;
}Expand description
A node that buffers output off the RT thread and must be flushed between cycles to actually ship its data.
flush is OFF-RT ONLY: it typically clones the stashed frame and pushes
it through an rtrb::Producer (allocating). Never call it from the RT
crate::Graph::process_cycle path.
Required Methods§
Sourcefn flush(&mut self) -> Result<(), FlushError>
fn flush(&mut self) -> Result<(), FlushError>
Push the stashed frame across the ring. Returns an error if the ring is full (treat as an xrun / dropped frame).
§Errors
Returns FlushError::RingFull if the ring has no free slot.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".