We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5881b53 commit d283298Copy full SHA for d283298
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
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