1 2 3 4 5 6 7 8 9 10 11
use httpcodec::HeaderField; #[derive(Debug)] pub enum Connection { Close, } impl From<Connection> for HeaderField<'static, 'static> { fn from(_: Connection) -> Self { unsafe { HeaderField::new_unchecked("Connection", "close") } } }