macros: Merge generate_element_with_text!() into generate_element!().

This commit is contained in:
Emmanuel Gil Peyrot 2018-08-02 19:07:07 +02:00
commit 36cfe76e4d
7 changed files with 71 additions and 83 deletions

View file

@ -10,17 +10,18 @@ use helpers::PlainText;
use sha1::Sha1;
use digest::Digest;
generate_element_with_text!(
generate_element!(
/// The main authentication mechanism for components.
Handshake, "handshake", COMPONENT,
/// If Some, contains the hex-encoded SHA-1 of the concatenation of the
/// stream id and the password, and is used to authenticate against the
/// server.
///
/// If None, it is the successful reply from the server, the stream is now
/// fully established and both sides can now exchange stanzas.
data: PlainText<Option<String>>
text: (
/// If Some, contains the hex-encoded SHA-1 of the concatenation of the
/// stream id and the password, and is used to authenticate against the
/// server.
///
/// If None, it is the successful reply from the server, the stream is now
/// fully established and both sides can now exchange stanzas.
data: PlainText<Option<String>>
)
);
impl Handshake {