[][src]Trait rtw::CurrentActivityRepository

pub trait CurrentActivityRepository {
    fn get_current_activity(&self) -> Result<Option<ActiveActivity>>;
fn set_current_activity(&mut self, activity: ActiveActivity) -> Result<()>;
fn reset_current_activity(&mut self) -> Result<()>; }

A service for persisting current activity

Abstracts current activity persistence

Required methods

fn get_current_activity(&self) -> Result<Option<ActiveActivity>>

Retrieve current activity if any

May fail depending on backend implementation

fn set_current_activity(&mut self, activity: ActiveActivity) -> Result<()>

Set activity as current activity

May fail depending on backend implementation

fn reset_current_activity(&mut self) -> Result<()>

Reset current activity to none

After calling this function, get_current_activity should return None

Loading content...

Implementors

Loading content...