Struct sea_streamer::SeaConsumer
source · pub struct SeaConsumer { /* private fields */ }
Available on crate feature
sea-streamer-socket
only.Expand description
sea-streamer-socket
concrete type of Consumer.
Trait Implementations§
source§impl Consumer for SeaConsumer
impl Consumer for SeaConsumer
type Error = BackendErr
type Message<'a> = SeaMessage<'a>
type NextFuture<'a> = NextFuture<'a>
type Stream<'a> = SeaMessageStream<'a>
source§async fn seek(
&mut self,
to: OffsetDateTime
) -> Result<(), StreamErr<BackendErr>>
async fn seek( &mut self, to: OffsetDateTime ) -> Result<(), StreamErr<BackendErr>>
Seek all streams to an arbitrary point in time. It will start consuming from the earliest message
with a timestamp later than
to
. Read moresource§async fn rewind(&mut self, pos: SeqPos) -> Result<(), StreamErr<BackendErr>>
async fn rewind(&mut self, pos: SeqPos) -> Result<(), StreamErr<BackendErr>>
Rewind all streams to a particular sequence number. Read more
source§fn assign(
&mut self,
ss: (StreamKey, ShardId)
) -> Result<(), StreamErr<BackendErr>>
fn assign( &mut self, ss: (StreamKey, ShardId) ) -> Result<(), StreamErr<BackendErr>>
Assign this consumer to a particular shard. Can be called multiple times to assign
to multiple shards. Returns error
StreamKeyNotFound
if the stream is not currently subscribed. Read moresource§fn unassign(
&mut self,
ss: (StreamKey, ShardId)
) -> Result<(), StreamErr<BackendErr>>
fn unassign( &mut self, ss: (StreamKey, ShardId) ) -> Result<(), StreamErr<BackendErr>>
Unassign a shard. Returns error
StreamKeyNotFound
if the stream is not currently subscribed.
Returns error StreamKeyEmpty
if all streams have been unassigned.source§fn next(&self) -> <SeaConsumer as Consumer>::NextFuture<'_>
fn next(&self) -> <SeaConsumer as Consumer>::NextFuture<'_>
Poll and receive one message: it awaits until there are new messages.
This method can be called from multiple threads.
source§impl Debug for SeaConsumer
impl Debug for SeaConsumer
source§impl From<KafkaConsumer> for SeaConsumer
impl From<KafkaConsumer> for SeaConsumer
source§fn from(i: KafkaConsumer) -> SeaConsumer
fn from(i: KafkaConsumer) -> SeaConsumer
Converts to this type from the input type.
source§impl From<StdioConsumer> for SeaConsumer
impl From<StdioConsumer> for SeaConsumer
source§fn from(i: StdioConsumer) -> SeaConsumer
fn from(i: StdioConsumer) -> SeaConsumer
Converts to this type from the input type.
source§impl SeaStreamerBackend for SeaConsumer
impl SeaStreamerBackend for SeaConsumer
type Kafka = KafkaConsumer
type Stdio = StdioConsumer
source§fn get_kafka(
&mut self
) -> Option<&mut <SeaConsumer as SeaStreamerBackend>::Kafka>
fn get_kafka( &mut self ) -> Option<&mut <SeaConsumer 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 <SeaConsumer as SeaStreamerBackend>::Stdio>
fn get_stdio( &mut self ) -> Option<&mut <SeaConsumer as SeaStreamerBackend>::Stdio>
Get the concrete type for the Stdio backend. None if it’s another Backend
Auto Trait Implementations§
impl Freeze for SeaConsumer
impl !RefUnwindSafe for SeaConsumer
impl Send for SeaConsumer
impl Sync for SeaConsumer
impl Unpin for SeaConsumer
impl !UnwindSafe for SeaConsumer
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