Struct sea_streamer_stdio::StdioProducer
source · pub struct StdioProducer { /* private fields */ }
Implementations§
Trait Implementations§
source§impl Clone for StdioProducer
impl Clone for StdioProducer
source§fn clone(&self) -> StdioProducer
fn clone(&self) -> StdioProducer
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 StdioProducer
impl Debug for StdioProducer
source§impl Producer for StdioProducer
impl Producer for StdioProducer
type Error = StdioErr
type SendFuture = SendFuture
source§fn send_to<S: Buffer>(
&self,
stream: &StreamKey,
payload: S
) -> StdioResult<Self::SendFuture>
fn send_to<S: Buffer>( &self, stream: &StreamKey, payload: S ) -> StdioResult<Self::SendFuture>
Send a message to a particular stream. This function is non-blocking.
You don’t have to await the future if you are not interested in the Receipt.
source§fn end<'async_trait>(
self
) -> Pin<Box<dyn Future<Output = StdioResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
fn end<'async_trait>( self ) -> Pin<Box<dyn Future<Output = StdioResult<()>> + Send + 'async_trait>>where Self: 'async_trait,
End this producer, only after flushing all it’s pending messages.
source§fn flush<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = StdioResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn flush<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = StdioResult<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Flush all pending messages.
source§fn anchor(&mut self, stream: StreamKey) -> StdioResult<()>
fn anchor(&mut self, stream: StreamKey) -> StdioResult<()>
Lock this producer to a particular stream. This function can only be called once.
Subsequent calls should return
StreamErr::AlreadyAnchored
error.source§fn anchored(&self) -> StdioResult<&StreamKey>
fn anchored(&self) -> StdioResult<&StreamKey>
If the producer is already anchored, return a reference to the StreamKey.
If the producer is not anchored, this will return
StreamErr::NotAnchored
error.