1 2 3 4 5 6 7 8 9
use anyhow::Result; use async_trait::async_trait; use xmpp_parsers::Element; #[async_trait] pub trait StanzaFilter { fn filter(&self, element: &Element) -> bool; async fn take(&self, element: Element) -> Result<()>; }