Skip to main content

NotificationClassPersistence

Trait NotificationClassPersistence 

Source
pub trait NotificationClassPersistence: Send + Sync {
    // Required methods
    fn load(
        &self,
        class: ObjectIdentifier,
    ) -> Result<Option<NotificationClassSnapshot>, Error>;
    fn save(
        &self,
        class: ObjectIdentifier,
        snapshot: &NotificationClassSnapshot,
    ) -> Result<(), Error>;
}
Expand description

Application-owned storage for one Notification Class’s Recipient_List.

The class calls it from its writer thread, one call at a time. A written list lands in storage a moment before the class serves it: see storage leads the served state.

Required Methods§

Source

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>

Durably replace what is saved for class with snapshot.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl NotificationClassPersistence for FileNotificationClassPersistence

Available on crate feature std only.