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 duplicate 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§async fn end(self) -> StreamResult<(), BackendErr>
async fn end(self) -> StreamResult<(), BackendErr>
End this producer, only after flushing all it’s pending messages.
Source§async fn flush(&mut self) -> StreamResult<(), BackendErr>
async fn flush(&mut self) -> StreamResult<(), BackendErr>
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.Auto Trait Implementations§
impl Freeze for SeaProducer
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