From 54b9fae6575c680645219b8480081217fe95af88 Mon Sep 17 00:00:00 2001 From: Elias Projahn Date: Fri, 5 Feb 2021 10:40:14 +0100 Subject: [PATCH] backend: Add some documentation --- crates/musicus_backend/src/lib.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/crates/musicus_backend/src/lib.rs b/crates/musicus_backend/src/lib.rs index d02d021..085dc2d 100644 --- a/crates/musicus_backend/src/lib.rs +++ b/crates/musicus_backend/src/lib.rs @@ -39,12 +39,28 @@ pub enum BackendState { /// A collection of all backend state and functionality. pub struct Backend { + /// A future resolving to the next state of the backend. Initially, this should be assumed to + /// be BackendState::Loading. Changes should be awaited before calling init(). pub state_stream: RefCell>, + + /// The internal sender to publish the state via state_stream. state_sender: RefCell>, + + /// Access to GSettings. settings: gio::Settings, + + /// The current path to the music library, which is used by the player and the database. This + /// is guaranteed to be Some, when the state is set to BackendState::Ready. music_library_path: RefCell>, + + /// The database. This can be assumed to exist, when the state is set to BackendState::Ready. database: RefCell>>, + + /// The player handling playlist and playback. This can be assumed to exist, when the state is + /// set to BackendState::Ready. player: RefCell>>, + + /// A client for the Wolfgang server. client: Client, }