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§
Sourcefn on_song_added(&self, song: Song) -> MoosyncResult<()>
fn on_song_added(&self, song: Song) -> MoosyncResult<()>
Called when a song is added to the database.
Sourcefn on_song_removed(&self, song: Song) -> MoosyncResult<()>
fn on_song_removed(&self, song: Song) -> MoosyncResult<()>
Called when a song is removed from the database.
Sourcefn on_playlist_added(&self, playlist: QueryablePlaylist) -> MoosyncResult<()>
fn on_playlist_added(&self, playlist: QueryablePlaylist) -> MoosyncResult<()>
Called when a playlist is added to the database.
Sourcefn on_playlist_removed(&self, playlist: QueryablePlaylist) -> MoosyncResult<()>
fn on_playlist_removed(&self, playlist: QueryablePlaylist) -> MoosyncResult<()>
Called when a playlist is removed from the database.