Struct sea_streamer_socket::SeaProducer
source · pub struct SeaProducer { /* private fields */ }
Expand description
sea-streamer-socket
concrete type of Producer.
Trait Implementations§
source§impl Clone for SeaProducer
impl Clone for SeaProducer
source§fn clone(&self) -> SeaProducer
fn clone(&self) -> SeaProducer
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 SeaProducer
impl Debug for SeaProducer
source§impl From<StdioProducer> for SeaProducer
impl From<StdioProducer> for SeaProducer
source§fn from(i: StdioProducer) -> Self
fn from(i: StdioProducer) -> Self
Converts to this type from the input type.
source§impl Producer for SeaProducer
impl Producer for SeaProducer
type Error = BackendErr
type SendFuture = SendFuture
source§fn send_to<S: Buffer>(
&self,
stream: &StreamKey,
payload: S
) -> StreamResult<Self::SendFuture, BackendErr>
fn send_to<S: Buffer>( &self, stream: &StreamKey, payload: S ) -> StreamResult<Self::SendFuture, BackendErr>
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 = StreamResult<(), BackendErr>> + Send + 'async_trait>>where
Self: 'async_trait,
fn end<'async_trait>( self ) -> Pin<Box<dyn Future<Output = StreamResult<(), BackendErr>> + 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 = StreamResult<(), BackendErr>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn flush<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = StreamResult<(), BackendErr>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Flush all pending messages.
source§fn anchor(&mut self, stream: StreamKey) -> StreamResult<(), BackendErr>
fn anchor(&mut self, stream: StreamKey) -> StreamResult<(), BackendErr>
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) -> StreamResult<&StreamKey, BackendErr>
fn anchored(&self) -> StreamResult<&StreamKey, BackendErr>
If the producer is already anchored, return a reference to the StreamKey.
If the producer is not anchored, this will return
StreamErr::NotAnchored
error.source§impl SeaStreamerBackend for SeaProducer
impl SeaStreamerBackend for SeaProducer
Auto Trait Implementations§
impl RefUnwindSafe for SeaProducer
impl Send for SeaProducer
impl Sync for SeaProducer
impl Unpin for SeaProducer
impl UnwindSafe for SeaProducer
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