pub struct LdpEnvelope {
pub message_id: String,
pub session_id: String,
pub from: String,
pub to: String,
pub body: LdpMessageBody,
pub payload_mode: PayloadMode,
pub timestamp: String,
pub provenance: Option<Provenance>,
pub signature: Option<String>,
pub signature_algorithm: Option<String>,
pub nonce: Option<String>,
}Expand description
LDP message envelope — wraps every protocol message.
Fields§
§message_id: StringMessage ID (UUID).
session_id: StringSession ID this message belongs to.
from: StringSender delegate ID.
to: StringRecipient delegate ID.
body: LdpMessageBodyMessage body.
payload_mode: PayloadModePayload mode used for this message.
timestamp: StringISO 8601 timestamp.
provenance: Option<Provenance>Optional provenance (attached to results).
signature: Option<String>HMAC signature of the message (hex-encoded).
signature_algorithm: Option<String>Signature algorithm (e.g., “hmac-sha256”).
nonce: Option<String>Replay-prevention nonce (16-byte hex). Required when signing is enabled.
Implementations§
Source§impl LdpEnvelope
impl LdpEnvelope
Sourcepub fn new(
session_id: impl Into<String>,
from: impl Into<String>,
to: impl Into<String>,
body: LdpMessageBody,
payload_mode: PayloadMode,
) -> Self
pub fn new( session_id: impl Into<String>, from: impl Into<String>, to: impl Into<String>, body: LdpMessageBody, payload_mode: PayloadMode, ) -> Self
Create a new envelope with auto-generated message ID and timestamp.
Trait Implementations§
Source§impl Clone for LdpEnvelope
impl Clone for LdpEnvelope
Source§fn clone(&self) -> LdpEnvelope
fn clone(&self) -> LdpEnvelope
Returns a duplicate of the value. Read more
1.0.0 · 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 LdpEnvelope
impl Debug for LdpEnvelope
Source§impl<'de> Deserialize<'de> for LdpEnvelope
impl<'de> Deserialize<'de> for LdpEnvelope
Source§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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for LdpEnvelope
impl RefUnwindSafe for LdpEnvelope
impl Send for LdpEnvelope
impl Sync for LdpEnvelope
impl Unpin for LdpEnvelope
impl UnsafeUnpin for LdpEnvelope
impl UnwindSafe for LdpEnvelope
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