sark_core/http/response/
hot.rs1use o3::buffer::Shared;
2
3use super::{DEFAULT_HEADER_CAPACITY, HeadInner};
4
5#[allow(clippy::large_enum_variant)]
6#[derive(Clone, Debug)]
7pub enum HotHeadInner<'req, const N: usize = DEFAULT_HEADER_CAPACITY> {
8 Wire(Shared),
9 Direct(HeadInner<'req, N>),
10}
11
12impl<'req, const N: usize> HotHeadInner<'req, N> {
13 pub(super) fn into_bytes(self) -> Shared {
14 match self {
15 Self::Wire(bytes) => bytes,
16 Self::Direct(head) => head.wire_headers(),
17 }
18 }
19}