pub trait PublisherExt<T>: Publisher<T> {
// Provided methods
fn with<F, Input, Output>(self, f: F) -> With<Self, F, Output>
where F: Fn(&Input) -> Result<Output>,
Self: Sized { ... }
fn publish_all<'life0, 'async_trait, S>(
&'life0 self,
stream: S,
max_concurrency: impl 'async_trait + Into<Option<usize>> + Send,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where T: Send,
S: 'async_trait + TryStream<Ok = T, Error = Error> + Send + Unpin,
Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
}
Expand description
Extension trait for Publisher
.
This trait provides additional functionality for Publisher
, similar to
how futures::SinkExt
does for futures::Sink
.
Provided Methods§
Sourcefn with<F, Input, Output>(self, f: F) -> With<Self, F, Output>
fn with<F, Input, Output>(self, f: F) -> With<Self, F, Output>
Compose a function in front of the publisher.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.