pub struct TimerEngine { /* private fields */ }
Implementations§
Source§impl TimerEngine
impl TimerEngine
pub async fn new( persistence: Arc<PersistenceManager>, ) -> Result<Self, PersistenceError>
pub fn subscribe_events(&mut self) -> UnboundedReceiver<TimerEvent>
pub async fn start_timer( &self, timer_type: TimerType, ) -> Result<(), PersistenceError>
pub async fn start_work_session( &self, timer_type: TimerType, project_name: Option<String>, description: Option<String>, ) -> Result<(), PersistenceError>
pub async fn get_current_state(&self) -> TimerData
pub async fn stop_timer(&self) -> Result<(), PersistenceError>
Auto Trait Implementations§
impl Freeze for TimerEngine
impl !RefUnwindSafe for TimerEngine
impl Send for TimerEngine
impl Sync for TimerEngine
impl Unpin for TimerEngine
impl !UnwindSafe for TimerEngine
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more