sark-h2 0.25.0

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
17
use dope::core::driver::route::Identity;

use crate::{server::Target, stream};

/// One task removed atomically from both global and connection-local ownership.
pub(in crate::server::task) struct Taken<'d, ID: Identity, T> {
    pub(in crate::server::task) target: Target<'d, ID>,
    pub(in crate::server::task) stream: stream::Key,
    pub(in crate::server::task) task: T,
    pub(in crate::server::task) unreported: bool,
}

impl<'d, ID: Identity, T> Taken<'d, ID, T> {
    pub(in crate::server::task) fn into_parts(self) -> (Target<'d, ID>, stream::Key, T, bool) {
        (self.target, self.stream, self.task, self.unreported)
    }
}