pub struct Envelope {Show 13 fields
pub acp_version: String,
pub message_class: MessageClass,
pub message_id: String,
pub operation_id: String,
pub timestamp: String,
pub expires_at: String,
pub sender: String,
pub recipients: Vec<String>,
pub context_id: String,
pub crypto_suite: String,
pub tenant: Option<String>,
pub correlation_id: Option<String>,
pub in_reply_to: Option<String>,
}Fields§
§acp_version: String§message_class: MessageClass§message_id: String§operation_id: String§timestamp: String§expires_at: String§sender: String§recipients: Vec<String>§context_id: String§crypto_suite: String§tenant: Option<String>§correlation_id: Option<String>§in_reply_to: Option<String>Implementations§
Source§impl Envelope
impl Envelope
pub fn build( sender: impl Into<String>, recipients: Vec<String>, message_class: MessageClass, context_id: impl Into<String>, expires_in_seconds: i64, operation_id: Option<String>, tenant: Option<String>, correlation_id: Option<String>, in_reply_to: Option<String>, crypto_suite: Option<String>, ) -> AcpResult<Self>
pub fn validate(&self) -> AcpResult<()>
pub fn is_expired(&self) -> bool
pub fn to_map(&self) -> AcpResult<JsonMap>
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<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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