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ยงasync fn connect(
_: StreamerUri,
options: Self::ConnectOptions
) -> StdioResult<Self>
async fn connect( _: StreamerUri, options: Self::ConnectOptions ) -> StdioResult<Self>
Nothing will happen until you create a producer/consumer
sourceยงasync fn disconnect(self) -> StdioResult<()>
async fn disconnect(self) -> StdioResult<()>
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ยงasync fn create_consumer(
&self,
streams: &[StreamKey],
options: Self::ConsumerOptions
) -> StdioResult<Self::Consumer>
async fn create_consumer( &self, streams: &[StreamKey], options: Self::ConsumerOptions ) -> StdioResult<Self::Consumer>
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ยงasync fn create_generic_producer(
&self,
_: Self::ProducerOptions
) -> StdioResult<Self::Producer>
async fn create_generic_producer( &self, _: Self::ProducerOptions ) -> StdioResult<Self::Producer>
Create a producer that can stream to any stream key.
Auto Trait Implementationsยง
impl Freeze for StdioStreamer
impl RefUnwindSafe for StdioStreamer
impl Send for StdioStreamer
impl Sync for StdioStreamer
impl Unpin for StdioStreamer
impl UnwindSafe for StdioStreamer
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