sasl: add Failure nonza

This commit is contained in:
Astro 2018-08-02 18:16:14 +02:00
parent caa5d90a9a
commit 866007621a

View file

@ -4,7 +4,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this // 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/. // file, You can obtain one at http://mozilla.org/MPL/2.0/.
use helpers::Base64; use helpers::{Base64, TrimmedPlainText};
generate_attribute!(Mechanism, "mechanism", { generate_attribute!(Mechanism, "mechanism", {
Plain => "PLAIN", Plain => "PLAIN",
@ -32,6 +32,10 @@ generate_element_with_text!(Success, "success", SASL,
data: Base64<Vec<u8>> data: Base64<Vec<u8>>
); );
generate_element_with_text!(Failure, "failure", SASL,
data: TrimmedPlainText<String>
);
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use super::*; use super::*;