flowly-service 0.4.13

Flowly is a library of modular and reusable components for building robust pipelines processing audio, video and other.
Documentation
use std::marker::PhantomData;

use futures::Stream;

use crate::{Context, Service};

#[inline]
pub fn stub<O>() -> Stub<O> {
    Stub(PhantomData)
}

#[derive(Debug, Clone, Copy)]
pub struct Stub<O>(PhantomData<O>);

impl<I: Send, O: Send> Service<I> for Stub<O> {
    type Out = O;

    fn handle(&mut self, _: I, _cx: &Context) -> impl Stream<Item = Self::Out> + Send {
        futures::stream::empty()
    }
}