pub struct MailInbox { /* private fields */ }Expand description
Cross-route message deduplication. The application stores accepted messages;
persist the inbox snapshot with them before deleting relay copies or acting.
accept never executes content or sends replies.
Implementations§
Source§impl MailInbox
impl MailInbox
pub fn new(keyring: MailKeyring) -> Self
pub fn keyring(&self) -> &MailKeyring
pub fn keyring_mut(&mut self) -> &mut MailKeyring
pub fn set_sender_blocked(&mut self, sender: AgentId, blocked: bool)
pub fn has(&self, sender: &AgentId, message_id: &str) -> bool
Sourcepub fn accept(
&mut self,
packet: &Packet,
claimed_packet_id: Option<&str>,
now: i64,
) -> Result<InboxAcceptance>
pub fn accept( &mut self, packet: &Packet, claimed_packet_id: Option<&str>, now: i64, ) -> Result<InboxAcceptance>
Verify the packet once, apply sender policy before decryption, then deduplicate the message.
pub fn prune(&mut self, now: i64) -> Result<()>
pub fn snapshot(&self) -> Result<Value>
pub fn from_snapshot(keyring: MailKeyring, value: &Value) -> Result<Self>
Auto Trait Implementations§
impl Freeze for MailInbox
impl RefUnwindSafe for MailInbox
impl Send for MailInbox
impl Sync for MailInbox
impl Unpin for MailInbox
impl UnsafeUnpin for MailInbox
impl UnwindSafe for MailInbox
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