sark-core 0.29.5

Fiber-free request, route, dispatch, and lifecycle core for Sark
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use super::Ready;
use crate::body::{self, credit};

// SAFETY: the finished owner and built output move unchanged with the new proof.
unsafe impl<'d, B: body::Build<'d>, O: credit::Origin> credit::raw::Bind for Ready<'d, B, O> {
    type Origin = O;
    type Bound<Q: credit::Origin> = Ready<'d, B, Q>;

    unsafe fn bind<Q: credit::Origin>(self, origin: Q) -> Self::Bound<Q> {
        Ready {
            // SAFETY: this is the exact ingress retained by the authenticated output.
            state: unsafe { self.state.bind(origin) },
            output: self.output,
            lifetime: self.lifetime,
        }
    }
}