sark-h2 0.28.7

Fiber-free HTTP/2 protocol primitives and manifold server for sark
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::frame::numbers;

#[derive(Clone, Copy)]
pub(in crate::server::task) enum Error {
    Full,
    Occupied,
}

impl Error {
    pub(in crate::server::task) const fn code(self) -> numbers::ErrorCode {
        match self {
            Self::Full => numbers::ErrorCode::RefusedStream,
            Self::Occupied => numbers::ErrorCode::InternalError,
        }
    }
}