Struct async_nats::PublishMessage
source · pub struct PublishMessage {
pub subject: Subject,
pub payload: Bytes,
pub reply: Option<Subject>,
pub headers: Option<HeaderMap>,
}
Expand description
PublishMessage
represents a message being published
Fields§
§subject: Subject
§payload: Bytes
§reply: Option<Subject>
§headers: Option<HeaderMap>
Trait Implementations§
source§impl Debug for PublishMessage
impl Debug for PublishMessage
source§impl Sink<PublishMessage> for Client
impl Sink<PublishMessage> for Client
source§type Error = Error<PublishErrorKind>
type Error = Error<PublishErrorKind>
The type of value produced by the sink when an error occurs.
source§fn poll_ready(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
) -> Poll<Result<(), Self::Error>>
fn poll_ready( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Result<(), Self::Error>>
Attempts to prepare the
Sink
to receive a value. Read moresource§fn start_send(
self: Pin<&mut Self>,
msg: PublishMessage,
) -> Result<(), Self::Error>
fn start_send( self: Pin<&mut Self>, msg: PublishMessage, ) -> Result<(), Self::Error>
Begin the process of sending a value to the sink.
Each call to this function must be preceded by a successful call to
poll_ready
which returned Poll::Ready(Ok(()))
. Read moreAuto Trait Implementations§
impl !Freeze for PublishMessage
impl RefUnwindSafe for PublishMessage
impl Send for PublishMessage
impl Sync for PublishMessage
impl Unpin for PublishMessage
impl UnwindSafe for PublishMessage
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