use std::sync::Arc;
use static_assertions::assert_impl_all;
use crate::message::message_address::MessageAddress;
use crate::traits::ActonMessage;
#[derive(Debug, Clone)]
pub struct Envelope {
pub message: Arc<dyn ActonMessage + Send + Sync + 'static>,
pub reply_to: MessageAddress,
pub recipient: MessageAddress,
}
impl Envelope {
pub fn new(
message: Arc<dyn ActonMessage + Send + Sync + 'static>,
reply_to: MessageAddress,
recipient: MessageAddress,
) -> Self {
Self {
message,
reply_to,
recipient,
}
}
}
assert_impl_all!(Envelope: Send);