use sampi::{SampiData, SampiFilter, SampiKeyPair}; fn main() -> anyhow::Result<()> { let kp = SampiKeyPair::new(); let data = "Hello World! 你好!".to_string(); let sampi = kp.new_sampi().build(vec![SampiData::String(data)])?; println!("Sampi size in bytes: {}", sampi.to_bytes().len()); let mut filter = SampiFilter::new(); filter.minimum_unix_time = Some(3); filter.data_variant = Some(15); dbg!(&filter); dbg!(&filter.matches(&sampi, None)); let f_s = kp.new_sampi().build(vec![SampiData::SampiFilter(filter)])?; dbg!(f_s.data); Ok(()) }