pub struct AckMessage {
pub code: i32,
pub headers: MessageHeaders,
pub message: String,
pub data: Option<String>,
}Expand description
ACK message for responding to messages
Fields§
§code: i32§headers: MessageHeaders§message: String§data: Option<String>Implementations§
Source§impl AckMessage
impl AckMessage
pub fn ok(message: &str) -> Self
pub fn error(code: i32, message: &str) -> Self
pub fn with_message_id(self, message_id: String) -> Self
pub fn with_content_type(self, content_type: &str) -> Self
pub fn with_data(self, data: Value) -> Self
pub fn response_data(data: Value) -> Self
Trait Implementations§
Source§impl Clone for AckMessage
impl Clone for AckMessage
Source§fn clone(&self) -> AckMessage
fn clone(&self) -> AckMessage
Returns a duplicate 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 AckMessage
impl Debug for AckMessage
Source§impl<'de> Deserialize<'de> for AckMessage
impl<'de> Deserialize<'de> for AckMessage
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for AckMessage
impl RefUnwindSafe for AckMessage
impl Send for AckMessage
impl Sync for AckMessage
impl Unpin for AckMessage
impl UnsafeUnpin for AckMessage
impl UnwindSafe for AckMessage
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