pub struct RpcRequestChunkPayload {
pub call_id: u64,
pub flags: u16,
pub headers: Vec<RpcHeader>,
pub body: Bytes,
}Expand description
Continuation chunk for a client-streaming or duplex REQUEST.
Lives after the 24-byte EventMeta prefix in a
DISPATCH_RPC_REQUEST_CHUNK event.
Unlike the initial RpcRequestPayload there is no
service field (server already routed by service at the
initial REQUEST) and no deadline_ns (the initial REQUEST’s
deadline applies to the whole call). The call_id field is
redundant with EventMeta::seq_or_ts but kept on the
payload so the codec is self-contained — a reader handed a
chunk’s bytes without the meta header can still recover its
correlation id.
Bidi streaming plan (Phase A).
Fields§
§call_id: u64Matches EventMeta::seq_or_ts and the original REQUEST’s
call_id. Kept on the payload so the codec round-trips
in isolation.
flags: u16Bitfield of FLAG_RPC_* constants. The only flag that
makes sense on a chunk today is FLAG_RPC_REQUEST_END;
other flags MUST be zero on the wire so future protocol
extensions can claim them without colliding with
existing chunks.
headers: Vec<RpcHeader>Per-chunk metadata. Typically empty; reserved for
trace-span continuity across long uploads, content-type
changes mid-stream, or other rare per-chunk concerns.
Capped at MAX_RPC_HEADERS entries with the same
per-field caps as RpcRequestPayload::headers.
body: BytesApplication-defined chunk body. Cap is MAX_RPC_BODY_LEN
(4 MiB), same as the initial REQUEST body — clients that
need >4 MiB total payload chunk their upload across
multiple REQUEST_CHUNK events.
See RpcRequestPayload::body for the Bytes-vs-Vec<u8>
rationale.
Implementations§
Source§impl RpcRequestChunkPayload
impl RpcRequestChunkPayload
Sourcepub fn encoded_len(&self) -> usize
pub fn encoded_len(&self) -> usize
Compute the encoded byte length WITHOUT actually encoding.
See RpcRequestPayload::encoded_len for the rationale.
Sourcepub fn encode(&self) -> Vec<u8> ⓘ
pub fn encode(&self) -> Vec<u8> ⓘ
Encode to the wire bytes that follow the 24-byte EventMeta
prefix in a DISPATCH_RPC_REQUEST_CHUNK event. Same
encoder-bounds policy as RpcRequestPayload::encode:
oversize fields panic in debug, the decoder enforces in
release.
Trait Implementations§
Source§impl Clone for RpcRequestChunkPayload
impl Clone for RpcRequestChunkPayload
Source§fn clone(&self) -> RpcRequestChunkPayload
fn clone(&self) -> RpcRequestChunkPayload
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RpcRequestChunkPayload
impl Debug for RpcRequestChunkPayload
impl Eq for RpcRequestChunkPayload
Source§impl PartialEq for RpcRequestChunkPayload
impl PartialEq for RpcRequestChunkPayload
Source§fn eq(&self, other: &RpcRequestChunkPayload) -> bool
fn eq(&self, other: &RpcRequestChunkPayload) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for RpcRequestChunkPayload
Auto Trait Implementations§
impl !Freeze for RpcRequestChunkPayload
impl RefUnwindSafe for RpcRequestChunkPayload
impl Send for RpcRequestChunkPayload
impl Sync for RpcRequestChunkPayload
impl Unpin for RpcRequestChunkPayload
impl UnsafeUnpin for RpcRequestChunkPayload
impl UnwindSafe for RpcRequestChunkPayload
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.