DatabaseEvents

Trait DatabaseEvents 

Source
pub trait DatabaseEvents {
    // Provided methods
    fn on_song_added(&self, req: SongAddedRequest) -> MoosyncResult<()> { ... }
    fn on_song_removed(&self, req: SongRemovedRequest) -> MoosyncResult<()> { ... }
    fn on_playlist_added(&self, req: PlaylistAddedRequest) -> MoosyncResult<()> { ... }
    fn on_playlist_removed(
        &self,
        req: PlaylistRemovedRequest,
    ) -> MoosyncResult<()> { ... }
}
Expand description

Trait for handling database-related events.

Provided Methods§

Source

fn on_song_added(&self, req: SongAddedRequest) -> MoosyncResult<()>

Called when a song is added to the database.

Source

fn on_song_removed(&self, req: SongRemovedRequest) -> MoosyncResult<()>

Called when a song is removed from the database.

Source

fn on_playlist_added(&self, req: PlaylistAddedRequest) -> MoosyncResult<()>

Called when a playlist is added to the database.

Source

fn on_playlist_removed(&self, req: PlaylistRemovedRequest) -> MoosyncResult<()>

Called when a playlist is removed from the database.

Implementors§