pub struct PeerRpcEnvelope {Show 15 fields
pub request_id: String,
pub trace_id: String,
pub protocol_version: ProtocolVersion,
pub source_core_id: CoreId,
pub target_core_id: CoreId,
pub tenant_id: TenantId,
pub cluster_id: ClusterId,
pub timestamp_ms: u64,
pub expires_at_ms: u64,
pub nonce: String,
pub capability: CapabilityName,
pub payload: Vec<u8>,
pub idempotency_key: Option<String>,
pub body_hash: String,
pub trace: Option<TraceContext>,
}Expand description
Authenticated peer request envelope.
Fields§
§request_id: StringStable request identity.
trace_id: StringTrace identity propagated across cores.
protocol_version: ProtocolVersionDistributed protocol version.
source_core_id: CoreIdCore issuing the request.
target_core_id: CoreIdCore expected to execute the request.
tenant_id: TenantIdTenant isolation boundary.
cluster_id: ClusterIdCluster isolation boundary.
timestamp_ms: u64Creation timestamp in milliseconds.
expires_at_ms: u64Expiration timestamp in milliseconds.
nonce: StringSingle-use replay-protection value.
capability: CapabilityNameGeneric capability being invoked.
payload: Vec<u8>Opaque application-owned payload.
idempotency_key: Option<String>Optional idempotency key for a mutating request.
body_hash: StringSHA-256 digest of payload.
trace: Option<TraceContext>Optional structured trace context.
Implementations§
Source§impl PeerRpcEnvelope
impl PeerRpcEnvelope
Sourcepub fn new(
request_id: impl Into<String>,
trace_id: impl Into<String>,
source_core_id: CoreId,
target_core_id: CoreId,
tenant_id: TenantId,
cluster_id: ClusterId,
timestamp_ms: u64,
expires_at_ms: u64,
nonce: impl Into<String>,
capability: CapabilityName,
payload: Vec<u8>,
idempotency_key: Option<String>,
trace: Option<TraceContext>,
) -> PeerRpcEnvelope
pub fn new( request_id: impl Into<String>, trace_id: impl Into<String>, source_core_id: CoreId, target_core_id: CoreId, tenant_id: TenantId, cluster_id: ClusterId, timestamp_ms: u64, expires_at_ms: u64, nonce: impl Into<String>, capability: CapabilityName, payload: Vec<u8>, idempotency_key: Option<String>, trace: Option<TraceContext>, ) -> PeerRpcEnvelope
Creates a versioned envelope and binds its payload digest.
Trait Implementations§
Source§impl Clone for PeerRpcEnvelope
impl Clone for PeerRpcEnvelope
Source§fn clone(&self) -> PeerRpcEnvelope
fn clone(&self) -> PeerRpcEnvelope
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PeerRpcEnvelope
impl Debug for PeerRpcEnvelope
Source§impl<'de> Deserialize<'de> for PeerRpcEnvelope
impl<'de> Deserialize<'de> for PeerRpcEnvelope
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<PeerRpcEnvelope, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PeerRpcEnvelope, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for PeerRpcEnvelope
Source§impl PartialEq for PeerRpcEnvelope
impl PartialEq for PeerRpcEnvelope
Source§impl Serialize for PeerRpcEnvelope
impl Serialize for PeerRpcEnvelope
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for PeerRpcEnvelope
Auto Trait Implementations§
impl Freeze for PeerRpcEnvelope
impl RefUnwindSafe for PeerRpcEnvelope
impl Send for PeerRpcEnvelope
impl Sync for PeerRpcEnvelope
impl Unpin for PeerRpcEnvelope
impl UnsafeUnpin for PeerRpcEnvelope
impl UnwindSafe for PeerRpcEnvelope
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
Mutably borrows from an owned value. Read more