pub struct PlainMessage {Show 13 fields
pub id: String,
pub typ: String,
pub type_: String,
pub body: Value,
pub from: String,
pub to: Vec<String>,
pub thid: Option<String>,
pub pthid: Option<String>,
pub extra_headers: HashMap<String, Value>,
pub created_time: Option<u64>,
pub expires_time: Option<u64>,
pub from_prior: Option<String>,
pub attachments: Option<Vec<Attachment>>,
}Expand description
Wrapper for plain message. Provides helpers for message building and packing/unpacking. Adapted from https://github.com/sicpa-dlab/didcomm-rust/blob/main/src/message/message.rs
Fields§
§id: StringMessage id. Must be unique to the sender.
typ: StringOptional, if present it must be “application/didcomm-plain+json”
type_: StringMessage type attribute value MUST be a valid Message Type URI, that when resolved gives human readable information about the message. The attribute’s value also informs the content of the message, or example the presence of other attributes and how they should be processed.
body: ValueMessage body.
from: StringSender identifier. The from attribute MUST be a string that is a valid DID or DID URL (without the fragment component) which identifies the sender of the message.
to: Vec<String>Identifier(s) for recipients. MUST be an array of strings where each element is a valid DID or DID URL (without the fragment component) that identifies a member of the message’s intended audience.
thid: Option<String>Uniquely identifies the thread that the message belongs to.
If not included the id property of the message MUST be treated as the value of the thid.
pthid: Option<String>If the message is a child of a thread the pthid
will uniquely identify which thread is the parent.
extra_headers: HashMap<String, Value>Custom message headers.
created_time: Option<u64>The attribute is used for the sender to express when they created the message, expressed in UTC Epoch Seconds (seconds since 1970-01-01T00:00:00Z UTC). This attribute is informative to the recipient, and may be relied on by protocols.
expires_time: Option<u64>The expires_time attribute is used for the sender to express when they consider the message to be expired, expressed in UTC Epoch Seconds (seconds since 1970-01-01T00:00:00Z UTC). This attribute signals when the message is considered no longer valid by the sender. When omitted, the message is considered to have no expiration by the sender.
from_prior: Option<String>from_prior is a compactly serialized signed JWT containing FromPrior value
attachments: Option<Vec<Attachment>>Trait Implementations§
Source§impl Clone for PlainMessage
impl Clone for PlainMessage
Source§fn clone(&self) -> PlainMessage
fn clone(&self) -> PlainMessage
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more