pub struct Messenger { /* private fields */ }Implementations§
Source§impl Messenger
impl Messenger
pub fn open(data_dir: &Path) -> Result<Self, ServerError>
Sourcepub fn sync(&mut self) -> Result<(), MessengerError>
pub fn sync(&mut self) -> Result<(), MessengerError>
Re-read the ledger when it changed and bring participants and rooms in line.
Sourcepub fn send(
&mut self,
from: &str,
to: &str,
subject: &str,
body: &str,
idempotency_key: Option<String>,
) -> Result<String, MessengerError>
pub fn send( &mut self, from: &str, to: &str, subject: &str, body: &str, idempotency_key: Option<String>, ) -> Result<String, MessengerError>
to is a node id (or hatchery.operator) or room:NAME.
pub fn inbox( &mut self, who: &str, since_ms: u64, limit: u16, ) -> Result<Vec<MailView>, MessengerError>
Sourcepub fn thread(
&mut self,
node: &str,
limit: u16,
) -> Result<Vec<MailView>, MessengerError>
pub fn thread( &mut self, node: &str, limit: u16, ) -> Result<Vec<MailView>, MessengerError>
Conversation between the operator and one node, both directions, oldest first. Empty for a node that is not a mailbox (neutral, suspended, revoked).
pub fn ack(&mut self, who: &str, message_id: &str) -> Result<(), MessengerError>
pub fn is_registered(&mut self, who: &str) -> bool
Auto Trait Implementations§
impl !RefUnwindSafe for Messenger
impl !UnwindSafe for Messenger
impl Freeze for Messenger
impl Send for Messenger
impl Sync for Messenger
impl Unpin for Messenger
impl UnsafeUnpin for Messenger
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