pub struct HotStore { /* private fields */ }Expand description
In-memory mirror of the postbox; disk is touched only on HotStore::flush.
Implementations§
Source§impl HotStore
impl HotStore
pub fn load(home: &UnifierHome) -> Result<Self>
pub fn is_dirty(&self) -> bool
pub fn put_key(&mut self, key: &str, value: &str) -> Result<()>
pub fn get_key(&self, key: &str) -> Result<Option<String>>
pub fn delete_key(&mut self, key: &str) -> Result<bool>
pub fn send(&mut self, recipient: &str, body: &str) -> Result<Uuid>
pub fn send_from( &mut self, from: &str, recipient: &str, body: &str, ) -> Result<Uuid>
pub fn post_cron(&mut self, schedule: &str, body: &str) -> Result<Uuid>
pub fn poll_mailbox(&self, recipient: &str) -> Result<Vec<Message>>
pub fn poll_cron(&self) -> Result<Vec<Message>>
pub fn list_dir( &self, home: &UnifierHome, subpath: &str, ) -> Result<Vec<Message>>
pub fn ack(&mut self, home: &UnifierHome, id_or_path: &str) -> Result<bool>
pub fn flush(&mut self, home: &UnifierHome) -> Result<()>
Source§impl HotStore
impl HotStore
pub fn tick_start(&mut self, label: &str) -> Result<TickStartOutcome>
pub fn tick_end(&mut self, home: &UnifierHome) -> Result<u64>
pub fn tick_status(&self) -> TickStatus
pub fn tick_lock(&mut self, key: &str) -> Result<()>
pub fn tick_unlock(&mut self, key: &str) -> Result<bool>
pub fn post_event(&mut self, payload: &str) -> Result<Uuid>
pub fn send_agent_message( &mut self, from: &str, to: &str, payload: &str, ) -> Result<Uuid>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HotStore
impl RefUnwindSafe for HotStore
impl Send for HotStore
impl Sync for HotStore
impl Unpin for HotStore
impl UnsafeUnpin for HotStore
impl UnwindSafe for HotStore
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