#[non_exhaustive]pub struct HookRequest {
pub procedure: &'static str,
pub headers: Vec<(&'static str, String)>,
pub body: Zeroizing<Vec<u8>>,
pub timeout: Duration,
pub max_response_bytes: usize,
}Expand description
One Connect unary call, ready to send.
The body may carry admission credentials, so core::fmt::Debug prints
only its length and the body is wiped when dropped. Channels must not log
it.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.procedure: &'static strThe full Connect path, e.g. /mkit.server.hooks.v1.HooksService/Admit;
the channel appends it to its base URL and does not follow redirects.
headers: Vec<(&'static str, String)>Every header to send: Content-Type, Connect-Protocol-Version and,
on a signed channel, the eight X-Mkit-Hook-* headers.
body: Zeroizing<Vec<u8>>The exact JSON body; the signature covers these bytes.
timeout: DurationHow long the call may take. Core also enforces it, so a channel that can cancel the underlying request should.
max_response_bytes: usizeStop reading the response after this many bytes plus one. Return what
was read with the real status, so core sees the oversize itself and a
2xx to a delivery still acknowledges (SPEC-SERVER §8); report
ChannelError::TooLarge only when no status is known. Core re-checks
the length it receives either way.