message: Make MessagePayload a trait, and implement it on every payload.
This commit is contained in:
parent
e41de29d9d
commit
07cccad356
10 changed files with 36 additions and 89 deletions
|
|
@ -4,6 +4,8 @@
|
|||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
use message::MessagePayload;
|
||||
|
||||
generate_element!(
|
||||
/// Structure representing an `<encryption xmlns='urn:xmpp:eme:0'/>` element.
|
||||
ExplicitMessageEncryption, "encryption", EME,
|
||||
|
|
@ -16,6 +18,8 @@ attributes: [
|
|||
name: Option<String> = "name" => optional,
|
||||
]);
|
||||
|
||||
impl MessagePayload for ExplicitMessageEncryption {}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
|
|
|||
Loading…
Reference in a new issue