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§async fn end(self) -> StdioResult<()>
async fn end(self) -> StdioResult<()>
End this producer, only after flushing all it’s pending messages.
source§async fn flush(&mut self) -> StdioResult<()>
async fn flush(&mut self) -> StdioResult<()>
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.Auto Trait Implementations§
impl Freeze for StdioProducer
impl RefUnwindSafe for StdioProducer
impl Send for StdioProducer
impl Sync for StdioProducer
impl Unpin for StdioProducer
impl UnwindSafe for StdioProducer
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