Skip to main content

REQUEST_CANCELLED

Constant REQUEST_CANCELLED 

Source
pub const REQUEST_CANCELLED: u64 = _; // 1u64
Expand description

The application error code a request stream is reset with when the requester abandons it: CANCELLED, 0x1.

Draft-17 removed UNSUBSCRIBE and FETCH_CANCEL and draft-18 keeps them gone. Cancelling a request is resetting the bidirectional stream it was made on, and CANCELLED is the code draft-18 assigns for “the stream was cancelled by either endpoint” — see StreamResetErrorCode::Cancelled. Taken from the codec’s own registry rather than written as a literal so a renumbering in a later draft cannot be missed here.

Draft-18 renamed the registry: draft-17 Section 14.5.4 called it “Data Stream Reset Error Codes” and draft-18 calls it “Stream Reset Error Codes” (Section 15.10), widening it to cover request streams explicitly. The value is unchanged.

This is what RequestStream::cancel uses when no code is chosen for it, and what RequestStream’s Drop sends.