switchback_traits/model/protocol.rs
1//! Protocol attachment envelope on contract and entity nodes.
2
3/// Opaque protocol binding stored on contract and entity IR nodes.
4///
5/// The `payload` bytes encode exactly one arm of a protocol-specific top-level
6/// oneof (for example `HttpPayload` or `GrpcPayload`).
7#[derive(Clone, Debug, Default, PartialEq, Eq)]
8pub struct ProtocolAttachment {
9 /// Stable protocol slug (for example `"http"`, `"grpc"`).
10 pub protocol_id: String,
11 /// Encoded protocol-specific payload message.
12 pub payload: Vec<u8>,
13}