UserSettingsCLI

Trait UserSettingsCLI 

Source
pub trait UserSettingsCLI {
    // Required methods
    fn last_run_at(&self) -> DateTime<Utc>;
    fn touch_last_run_at(&self) -> Result<()>;
    fn init(path: Option<&PathBuf>) -> Result<UserSettings>;
    fn read(path: Option<&PathBuf>) -> Result<UserSettings>;
    fn save(&self, path: Option<&PathBuf>) -> Result<()>;
    fn default_path() -> PathBuf;
    async fn create_account(self, host: Option<&str>) -> Result<()>;
    async fn delete_account(&self, host: Option<&str>) -> Result<()>;
    async fn sync_account(&self, host: Option<&str>) -> Result<()>;
}

Required Methods§

Source

fn last_run_at(&self) -> DateTime<Utc>

Source

fn touch_last_run_at(&self) -> Result<()>

Source

fn init(path: Option<&PathBuf>) -> Result<UserSettings>

Source

fn read(path: Option<&PathBuf>) -> Result<UserSettings>

Source

fn save(&self, path: Option<&PathBuf>) -> Result<()>

Source

fn default_path() -> PathBuf

Source

async fn create_account(self, host: Option<&str>) -> Result<()>

Source

async fn delete_account(&self, host: Option<&str>) -> Result<()>

Source

async fn sync_account(&self, host: Option<&str>) -> Result<()>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl UserSettingsCLI for UserSettings

Source§

fn last_run_at(&self) -> DateTime<Utc>

Source§

fn touch_last_run_at(&self) -> Result<()>

Source§

fn init(path: Option<&PathBuf>) -> Result<Self>

Source§

fn read(path: Option<&PathBuf>) -> Result<Self>

Source§

fn save(&self, path: Option<&PathBuf>) -> Result<()>

Source§

fn default_path() -> PathBuf

Source§

async fn create_account(self, host: Option<&str>) -> Result<()>

Source§

async fn delete_account(&self, host: Option<&str>) -> Result<()>

Source§

async fn sync_account(&self, host: Option<&str>) -> Result<()>

Implementors§