pub struct PipeSubrequestState {
pub saved_body: Option<SavedBody>,
pub header_received: bool,
pub join_handle: Option<JoinHandle<()>>,
pub pipe_rx: Option<Receiver<HttpTask>>,
}Expand description
Outcome of pipe_subrequest.
Fields§
§saved_body: Option<SavedBody>Captured body from the main session.
header_received: boolDid the subrequest produce a response header? Checked before the task filter runs, so a filtered-out header still counts.
join_handle: Option<JoinHandle<()>>The spawned subrequest task handle. Always set after spawn. Caller is responsible for awaiting/inspecting state.
pipe_rx: Option<Receiver<HttpTask>>The receiving half of the pipe channel. When the coordinator exits
pipe_subrequest before the subrequest task finishes writing, this
receiver must be kept alive and drained alongside the join handle;
otherwise dropping it breaks the pipe and prevents the writer from
completing its cache-write lifecycle.
Implementations§
Source§impl PipeSubrequestState
impl PipeSubrequestState
Sourcepub fn snapshot_for_error(&mut self) -> Self
pub fn snapshot_for_error(&mut self) -> Self
Creates a snapshot for error reporting, excluding the join handle.
Moves pipe_rx into the snapshot so the receiver stays alive through
the error path and is not dropped when self is cleaned up.
Used by [map_pipe_err] to capture state at the point of failure.