sark-h2 0.8.7

HTTP/2 protocol primitives + client/server bootstrap for sark stack
Documentation
use dope::runtime::profile::{Production, Tail, Throughput};

/// Flow-control and buffering limits keyed on a deployment profile marker.
///
/// ```
/// use sark_h2::tuning::Tuning;
/// use dope::runtime::profile::Throughput;
/// assert!(<Throughput as Tuning>::CONN_RECV_WINDOW >= <Throughput as Tuning>::STREAM_RECV_WINDOW);
/// ```
pub trait Tuning: 'static {
    const STREAM_RECV_WINDOW: u32;
    const CONN_RECV_WINDOW: u32;
    const MAX_BODY_LEN: usize;
    const MAX_CONN_BUFFERED_LEN: usize;
}

impl Tuning for Throughput {
    const STREAM_RECV_WINDOW: u32 = 4 << 20;
    const CONN_RECV_WINDOW: u32 = 16 << 20;
    const MAX_BODY_LEN: usize = 16 << 20;
    const MAX_CONN_BUFFERED_LEN: usize = 64 << 20;
}

impl Tuning for Production {
    const STREAM_RECV_WINDOW: u32 = 1 << 20;
    const CONN_RECV_WINDOW: u32 = 8 << 20;
    const MAX_BODY_LEN: usize = 4 << 20;
    const MAX_CONN_BUFFERED_LEN: usize = 16 << 20;
}

impl Tuning for Tail {
    const STREAM_RECV_WINDOW: u32 = 256 << 10;
    const CONN_RECV_WINDOW: u32 = 1 << 20;
    const MAX_BODY_LEN: usize = 1 << 20;
    const MAX_CONN_BUFFERED_LEN: usize = 4 << 20;
}