use std::fmt::Display;
#[derive(Debug, PartialEq)]
pub enum Algorithm {
XChaCha20Poly1305,
}
impl Display for Algorithm {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Algorithm::XChaCha20Poly1305 => write!(f, "XChaCha20-Poly1305"),
}
}
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_algorithm_display() {
assert_eq!(
format!("{}", Algorithm::XChaCha20Poly1305),
"XChaCha20-Poly1305"
);
}
}