switchback-traits 0.0.1-0.dev.2

Core traits of the switchback framework.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
//! Protocol attachment envelope on contract and entity nodes.

/// Opaque protocol binding stored on contract and entity IR nodes.
///
/// The `payload` bytes encode exactly one arm of a protocol-specific top-level
/// oneof (for example `HttpPayload` or `GrpcPayload`).
#[derive(Clone, Debug, Default, PartialEq, Eq)]
pub struct ProtocolAttachment {
    /// Stable protocol slug (for example `"http"`, `"grpc"`).
    pub protocol_id: String,
    /// Encoded protocol-specific payload message.
    pub payload: Vec<u8>,
}