pubsub: Add a PubSubPayload trait.

This commit is contained in:
Emmanuel Gil Peyrot 2019-01-27 17:40:46 +01:00
commit d60feffc22
3 changed files with 20 additions and 1 deletions

View file

@ -5,6 +5,7 @@
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
use crate::hashes::Sha1HexAttribute;
use crate::pubsub::PubSubPayload;
use crate::util::helpers::WhitespaceAwareBase64;
generate_element!(
@ -16,6 +17,8 @@ generate_element!(
]
);
impl PubSubPayload for Metadata {}
generate_element!(
/// Communicates avatar metadata.
Info, "info", AVATAR_METADATA,
@ -49,6 +52,8 @@ generate_element!(
)
);
impl PubSubPayload for Data {}
#[cfg(test)]
mod tests {
use super::*;