pub struct MessagingClient { /* private fields */ }Expand description
Messaging module client.
Implementations§
Source§impl MessagingClient
impl MessagingClient
Sourcepub async fn publish(
&self,
topic: impl Into<String>,
value: impl Into<Bytes>,
options: PublishOptions,
) -> Result<RecordResult, KrabkaError>
pub async fn publish( &self, topic: impl Into<String>, value: impl Into<Bytes>, options: PublishOptions, ) -> Result<RecordResult, KrabkaError>
Publish one raw record.
§Errors
Returns an error for invalid input, transport failures, or a gateway record error.
Sourcepub async fn publish_event(
&self,
topic: impl Into<String>,
event: CloudEvent,
) -> Result<RecordResult, KrabkaError>
pub async fn publish_event( &self, topic: impl Into<String>, event: CloudEvent, ) -> Result<RecordResult, KrabkaError>
Publish a CloudEvent using the contract’s binary-mode header mapping.
§Errors
Returns an error for invalid input, transport failures, or a gateway record error.
Trait Implementations§
Source§impl Clone for MessagingClient
impl Clone for MessagingClient
Source§fn clone(&self) -> MessagingClient
fn clone(&self) -> MessagingClient
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 moreAuto Trait Implementations§
impl Freeze for MessagingClient
impl RefUnwindSafe for MessagingClient
impl Send for MessagingClient
impl Sync for MessagingClient
impl Unpin for MessagingClient
impl UnsafeUnpin for MessagingClient
impl UnwindSafe for MessagingClient
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