pub struct StreamPreamble {
pub kind: i32,
pub request_id: String,
pub authorized: bool,
pub route: String,
pub timeout_ms: u32,
pub client_addr: String,
pub scheme: String,
}Expand description
the first thing on every exchange stream, node -> worker. It carries only what the worker cannot derive from the HTTP bytes that follow and what it must not infer from client-supplied headers - identity above all.
Fields§
§kind: i32what the bytes after this preamble are. A field rather than a framing tag, so a new stream semantic costs no new mechanism.
request_id: Stringthe caller holds agent-endpoint call permission for this agent and deployment. Always true on a non-public route.
route: Stringthe manifest template that matched, e.g. “/items/{id}”
timeout_ms: u32relative, because node and worker clocks are not synchronized. 0 imposes no deadline.
client_addr: Stringend client address, host only
scheme: String“http” or “https” as the end client saw it; not derivable worker-side
NEXT_ID: 8
Implementations§
Source§impl StreamPreamble
impl StreamPreamble
Sourcepub fn kind(&self) -> AgentEndpointKind
pub fn kind(&self) -> AgentEndpointKind
Returns the enum value of kind, or the default if the field is set to an invalid enum value.
Sourcepub fn set_kind(&mut self, value: AgentEndpointKind)
pub fn set_kind(&mut self, value: AgentEndpointKind)
Sets kind to the provided enum value.
Trait Implementations§
Source§impl Clone for StreamPreamble
impl Clone for StreamPreamble
Source§impl Debug for StreamPreamble
impl Debug for StreamPreamble
Source§impl Default for StreamPreamble
impl Default for StreamPreamble
§impl<'de> Deserialize<'de> for StreamPreamble
impl<'de> Deserialize<'de> for StreamPreamble
§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
impl Eq for StreamPreamble
Source§impl Hash for StreamPreamble
impl Hash for StreamPreamble
Source§impl Message for StreamPreamble
impl Message for StreamPreamble
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.