moosync_edk::api

Trait DatabaseEvents

Source
pub trait DatabaseEvents {
    // Provided methods
    fn on_song_added(&self, song: Song) -> MoosyncResult<()> { ... }
    fn on_song_removed(&self, song: Song) -> MoosyncResult<()> { ... }
    fn on_playlist_added(
        &self,
        playlist: QueryablePlaylist,
    ) -> MoosyncResult<()> { ... }
    fn on_playlist_removed(
        &self,
        playlist: QueryablePlaylist,
    ) -> MoosyncResult<()> { ... }
}
Expand description

Trait for handling database-related events.

Provided Methods§

Source

fn on_song_added(&self, song: Song) -> MoosyncResult<()>

Called when a song is added to the database.

Source

fn on_song_removed(&self, song: Song) -> MoosyncResult<()>

Called when a song is removed from the database.

Source

fn on_playlist_added(&self, playlist: QueryablePlaylist) -> MoosyncResult<()>

Called when a playlist is added to the database.

Source

fn on_playlist_removed(&self, playlist: QueryablePlaylist) -> MoosyncResult<()>

Called when a playlist is removed from the database.

Implementors§