sasl: add Failure nonza

Astro created

Change summary

src/sasl.rs | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

Detailed changes

src/sasl.rs 🔗

@@ -4,7 +4,7 @@
 // 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 helpers::Base64;
+use helpers::{Base64, TrimmedPlainText};
 
 generate_attribute!(Mechanism, "mechanism", {
     Plain => "PLAIN",
@@ -32,6 +32,10 @@ generate_element_with_text!(Success, "success", SASL,
     data: Base64<Vec<u8>>
 );
 
+generate_element_with_text!(Failure, "failure", SASL,
+    data: TrimmedPlainText<String>
+);
+
 #[cfg(test)]
 mod tests {
     use super::*;