1 2 3 4 5 6 7 8 9 10 11 12 13
use std::fmt::{Display, Formatter, Result as FmtResult}; #[derive(Debug, PartialEq, Clone, Eq, Hash)] pub struct Cookie { pub client_cookie: [u8; 8], pub server_cookie: Vec<u8>, } impl Display for Cookie { fn fmt(&self, f: &mut Formatter<'_>) -> FmtResult { write!(f, "{:x?} {:x?}", self.client_cookie, self.server_cookie) } }