pub struct Envelope {
pub v: u8,
pub payload: String,
pub nonce: String,
pub ts: i64,
pub sig: Option<Sig>,
}Expand description
A versioned, signed (or freshness-stamped) message envelope (ADR-020 §3).
payload/nonce/the signature are carried base64-encoded so the envelope is
JSON/transport-friendly and transport-agnostic (a consumer applies it to HTTP
bodies, its own UDP gossip, anything). In Open posture sig is absent.
Fields§
§v: u8Wire version — selects the verification construction (see ENVELOPE_V1).
payload: StringThe signed bytes, base64 (standard) encoded.
nonce: StringA random per-message nonce, base64 (standard) encoded — replay uniqueness.
ts: i64Signer’s clock at sign time, unix seconds — drives the freshness window.
sig: Option<Sig>The signature block. Absent in Open posture (a freshness-stamped passthrough); present and verified in Authenticated posture.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Envelope
impl<'de> Deserialize<'de> for Envelope
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
impl Eq for Envelope
impl StructuralPartialEq for Envelope
Auto Trait Implementations§
impl Freeze for Envelope
impl RefUnwindSafe for Envelope
impl Send for Envelope
impl Sync for Envelope
impl Unpin for Envelope
impl UnsafeUnpin for Envelope
impl UnwindSafe for Envelope
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.