Struct sea_streamer::SeaProducer
source · pub struct SeaProducer { /* private fields */ }
Available on crate feature
sea-streamer-socket
only.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<KafkaProducer> for SeaProducer
impl From<KafkaProducer> for SeaProducer
source§fn from(i: KafkaProducer) -> SeaProducer
fn from(i: KafkaProducer) -> SeaProducer
Converts to this type from the input type.
source§impl From<StdioProducer> for SeaProducer
impl From<StdioProducer> for SeaProducer
source§fn from(i: StdioProducer) -> SeaProducer
fn from(i: StdioProducer) -> SeaProducer
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>(
&self,
stream: &StreamKey,
payload: S
) -> Result<<SeaProducer as Producer>::SendFuture, StreamErr<BackendErr>>where
S: Buffer,
fn send_to<S>(
&self,
stream: &StreamKey,
payload: S
) -> Result<<SeaProducer as Producer>::SendFuture, StreamErr<BackendErr>>where
S: Buffer,
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) -> Result<(), StreamErr<BackendErr>>
async fn end(self) -> Result<(), StreamErr<BackendErr>>
End this producer, only after flushing all it’s pending messages.
source§fn anchor(&mut self, stream: StreamKey) -> Result<(), StreamErr<BackendErr>>
fn anchor(&mut self, stream: StreamKey) -> Result<(), StreamErr<BackendErr>>
Lock this producer to a particular stream. This function can only be called once.
Subsequent calls should return
StreamErr::AlreadyAnchored
error.source§impl SeaStreamerBackend for SeaProducer
impl SeaStreamerBackend for SeaProducer
type Kafka = KafkaProducer
type Stdio = StdioProducer
source§fn get_kafka(
&mut self
) -> Option<&mut <SeaProducer as SeaStreamerBackend>::Kafka>
fn get_kafka( &mut self ) -> Option<&mut <SeaProducer as SeaStreamerBackend>::Kafka>
Get the concrete type for the Kafka backend. None if it’s another Backend
source§fn get_stdio(
&mut self
) -> Option<&mut <SeaProducer as SeaStreamerBackend>::Stdio>
fn get_stdio( &mut self ) -> Option<&mut <SeaProducer as SeaStreamerBackend>::Stdio>
Get the concrete type for the Stdio backend. None if it’s another Backend
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