Struct mu_rust_message_client::Exchange
source · pub struct Exchange {
pub timestamp: NaiveDateTime,
pub topic: String,
pub tenant: Option<String>,
pub headers: HashMap<String, String, RandomState>,
pub message: Vec<u8, Global>,
}
Fields§
§timestamp: NaiveDateTime
§topic: String
§tenant: Option<String>
§headers: HashMap<String, String, RandomState>
§message: Vec<u8, Global>
Implementations§
source§impl Exchange
impl Exchange
pub fn new( message: &[u8], topic: &str, tenant: Option<String>, headers: HashMap<String, String, RandomState> ) -> Exchange
pub fn deserialize(s: &[u8]) -> Result<Exchange, Box<ErrorKind, Global>>
pub fn serialize(&self) -> Result<Vec<u8, Global>, Box<ErrorKind, Global>>
pub fn get_message_as_string(msg: &[u8]) -> String
Trait Implementations§
source§impl<'de> Deserialize<'de> for Exchange
impl<'de> Deserialize<'de> for Exchange
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<Exchange, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<Exchange, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq<Exchange> for Exchange
impl PartialEq<Exchange> for Exchange
source§impl Serialize for Exchange
impl Serialize for Exchange
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where __S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for Exchange
impl StructuralEq for Exchange
impl StructuralPartialEq for Exchange
Auto Trait Implementations§
impl RefUnwindSafe for Exchange
impl Send for Exchange
impl Sync for Exchange
impl Unpin for Exchange
impl UnwindSafe for Exchange
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