pub struct FileNotificationClassPersistence { /* private fields */ }Expand description
A file holding one Notification Class’s Recipient_List, replaced whole on
each save, the same way as FileNotificationForwarderPersistence: a
failed save leaves the previous list in place, and a completed one
survives a power loss.
The file holds a magic tag, the class’s object identifier, one octet that is 1 when a Recipient_List follows and 0 when not, and then the encoded Recipient_List. It does not coordinate between processes.
Implementations§
Trait Implementations§
Source§impl NotificationClassPersistence for FileNotificationClassPersistence
impl NotificationClassPersistence for FileNotificationClassPersistence
Source§fn load(
&self,
class: ObjectIdentifier,
) -> Result<Option<NotificationClassSnapshot>, Error>
fn load( &self, class: ObjectIdentifier, ) -> Result<Option<NotificationClassSnapshot>, Error>
What was last saved for
class, or None when nothing was saved.Source§fn save(
&self,
class: ObjectIdentifier,
snapshot: &NotificationClassSnapshot,
) -> Result<(), Error>
fn save( &self, class: ObjectIdentifier, snapshot: &NotificationClassSnapshot, ) -> Result<(), Error>
Durably replace what is saved for
class with snapshot.Auto Trait Implementations§
impl Freeze for FileNotificationClassPersistence
impl RefUnwindSafe for FileNotificationClassPersistence
impl Send for FileNotificationClassPersistence
impl Sync for FileNotificationClassPersistence
impl Unpin for FileNotificationClassPersistence
impl UnsafeUnpin for FileNotificationClassPersistence
impl UnwindSafe for FileNotificationClassPersistence
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