We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 5881b53 + 0c238d6 commit 4fe1b28Copy full SHA for 4fe1b28
src/message.rs
@@ -22,6 +22,10 @@ impl EncodedMessage {
22
base64::decode(&self.data)
23
}
24
25
+ pub fn attributes(&self) -> Option<&HashMap<String, String>> {
26
+ self.attributes.as_ref()
27
+ }
28
+
29
pub fn new<T: serde::Serialize>(data: &T, attributes: Option<HashMap<String, String>>) -> Self {
30
let json = serde_json::to_string(data).unwrap();
31
let data = base64::encode(&json);
0 commit comments