pub struct AnalyzerSink { /* private fields */ }Available on crate feature
tokio only.Expand description
A futures_sink::Sink that ingests Vec<f32> interleaved sample
chunks into the wrapped Analyzer.
The sink is permanently in the ready state; send and friends never
block waiting for capacity. Errors from
Analyzer::push_interleaved surface as Sink::Error.
Implementations§
Source§impl AnalyzerSink
impl AnalyzerSink
Sourcepub fn into_inner(self) -> Option<Analyzer>
pub fn into_inner(self) -> Option<Analyzer>
Recover the inner analyzer, e.g. to call
Analyzer::finalize.
Returns None if the sink was already consumed.
Sourcepub fn analyzer_mut(&mut self) -> Option<&mut Analyzer>
pub fn analyzer_mut(&mut self) -> Option<&mut Analyzer>
Borrow the inner analyzer for snapshotting.
Trait Implementations§
Source§impl Debug for AnalyzerSink
impl Debug for AnalyzerSink
Source§impl Sink<Vec<f32>> for AnalyzerSink
impl Sink<Vec<f32>> for AnalyzerSink
Source§fn poll_ready(
self: Pin<&mut Self>,
_cx: &mut Context<'_>,
) -> Poll<Result<(), Self::Error>>
fn poll_ready( self: Pin<&mut Self>, _cx: &mut Context<'_>, ) -> Poll<Result<(), Self::Error>>
Attempts to prepare the
Sink to receive a value. Read moreSource§fn start_send(self: Pin<&mut Self>, item: Vec<f32>) -> Result<(), Self::Error>
fn start_send(self: Pin<&mut Self>, item: Vec<f32>) -> Result<(), Self::Error>
Begin the process of sending a value to the sink.
Each call to this function must be preceded by a successful call to
poll_ready which returned Poll::Ready(Ok(())). Read moreAuto Trait Implementations§
impl Freeze for AnalyzerSink
impl RefUnwindSafe for AnalyzerSink
impl Send for AnalyzerSink
impl Sync for AnalyzerSink
impl Unpin for AnalyzerSink
impl UnsafeUnpin for AnalyzerSink
impl UnwindSafe for AnalyzerSink
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more