pub struct StreamBufferPublisher { /* private fields */ }Expand description
Publisher side of the stream_buffer endpoint.
send appends a message to the partition selected by
message.metadata["correlation_id"]. It does not accept messages without a
correlation id because otherwise consumers could not safely read one stream
without also consuming another stream’s responses.
Implementations§
Source§impl StreamBufferPublisher
impl StreamBufferPublisher
pub fn new(config: &StreamBufferConfig) -> Result<Self>
Trait Implementations§
Source§impl Clone for StreamBufferPublisher
impl Clone for StreamBufferPublisher
Source§fn clone(&self) -> StreamBufferPublisher
fn clone(&self) -> StreamBufferPublisher
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 StreamBufferPublisher
impl Debug for StreamBufferPublisher
Source§impl MessagePublisher for StreamBufferPublisher
impl MessagePublisher for StreamBufferPublisher
fn send<'life0, 'async_trait>(
&'life0 self,
message: CanonicalMessage,
) -> Pin<Box<dyn Future<Output = Result<Sent, PublisherError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn send_batch<'life0, 'async_trait>(
&'life0 self,
messages: Vec<CanonicalMessage>,
) -> Pin<Box<dyn Future<Output = Result<SentBatch, PublisherError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_batch<'life0, 'async_trait>(
&'life0 self,
messages: Vec<CanonicalMessage>,
) -> Pin<Box<dyn Future<Output = Result<SentBatch, PublisherError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sends a batch of messages. Read more
fn status<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = EndpointStatus> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn as_any(&self) -> &dyn Any
Source§fn on_connect_hook(&self) -> Option<BoxFuture<'_, Result<()>>>
fn on_connect_hook(&self) -> Option<BoxFuture<'_, Result<()>>>
Returns an optional lifecycle hook that runs once after the publisher connection is created. Read more
Source§fn on_disconnect_hook(&self) -> Option<BoxFuture<'_, Result<()>>>
fn on_disconnect_hook(&self) -> Option<BoxFuture<'_, Result<()>>>
Returns an optional lifecycle hook that runs before the publisher is dropped. Read more
fn flush<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl Freeze for StreamBufferPublisher
impl RefUnwindSafe for StreamBufferPublisher
impl Send for StreamBufferPublisher
impl Sync for StreamBufferPublisher
impl Unpin for StreamBufferPublisher
impl UnsafeUnpin for StreamBufferPublisher
impl UnwindSafe for StreamBufferPublisher
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