Struct sea_streamer_stdio::StdioStreamer
source ยท pub struct StdioStreamer { /* private fields */ }Trait Implementationsยง
sourceยงimpl Clone for StdioStreamer
impl Clone for StdioStreamer
sourceยงfn clone(&self) -> StdioStreamer
fn clone(&self) -> StdioStreamer
Returns a copy of the value. Read more
1.0.0 ยท sourceยงfn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceยงimpl Debug for StdioStreamer
impl Debug for StdioStreamer
sourceยงimpl Default for StdioStreamer
impl Default for StdioStreamer
sourceยงfn default() -> StdioStreamer
fn default() -> StdioStreamer
Returns the โdefault valueโ for a type. Read more
sourceยงimpl Streamer for StdioStreamer
impl Streamer for StdioStreamer
sourceยงfn connect<'async_trait>(
__arg0: StreamerUri,
options: Self::ConnectOptions
) -> Pin<Box<dyn Future<Output = StdioResult<Self>> + Send + 'async_trait>>where
Self: 'async_trait,
fn connect<'async_trait>( __arg0: StreamerUri, options: Self::ConnectOptions ) -> Pin<Box<dyn Future<Output = StdioResult<Self>> + Send + 'async_trait>>where Self: 'async_trait,
Nothing will happen until you create a producer/consumer
sourceยงfn disconnect<'async_trait>(
self
) -> Pin<Box<dyn Future<Output = StdioResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
fn disconnect<'async_trait>( self ) -> Pin<Box<dyn Future<Output = StdioResult<()>> + Send + 'async_trait>>where Self: 'async_trait,
Call this method if you want to exit gracefully. This waits asynchronously until all pending messages are sent.
The side effects is global: all existing consumers and producers will become unusable, until you connect again.
sourceยงfn create_consumer<'life0, 'life1, 'async_trait>(
&'life0 self,
streams: &'life1 [StreamKey],
options: Self::ConsumerOptions
) -> Pin<Box<dyn Future<Output = StdioResult<Self::Consumer>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create_consumer<'life0, 'life1, 'async_trait>( &'life0 self, streams: &'life1 [StreamKey], options: Self::ConsumerOptions ) -> Pin<Box<dyn Future<Output = StdioResult<Self::Consumer>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
A background thread will be spawned to read stdin dedicatedly. It is safe to spawn multiple consumers.
type Error = StdioErr
type Producer = StdioProducer
type Consumer = StdioConsumer
type ConnectOptions = StdioConnectOptions
type ConsumerOptions = StdioConsumerOptions
type ProducerOptions = StdioProducerOptions
sourceยงfn create_generic_producer<'life0, 'async_trait>(
&'life0 self,
__arg1: Self::ProducerOptions
) -> Pin<Box<dyn Future<Output = StdioResult<Self::Producer>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create_generic_producer<'life0, 'async_trait>( &'life0 self, __arg1: Self::ProducerOptions ) -> Pin<Box<dyn Future<Output = StdioResult<Self::Producer>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Create a producer that can stream to any stream key.
sourceยงfn create_producer<'life0, 'async_trait>(
&'life0 self,
stream: StreamKey,
options: Self::ProducerOptions
) -> Pin<Box<dyn Future<Output = Result<Self::Producer, StreamErr<Self::Error>>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn create_producer<'life0, 'async_trait>( &'life0 self, stream: StreamKey, options: Self::ProducerOptions ) -> Pin<Box<dyn Future<Output = Result<Self::Producer, StreamErr<Self::Error>>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Self: Sync + 'async_trait,
Create a producer that streams to the specified stream.