synd-runtime 0.4.0

Runtime session and singleton daemon lifecycle for syndicationd
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::path::{Path, PathBuf};

#[derive(Debug, Clone, PartialEq, Eq)]
pub enum RuntimeDatabase {
    Sqlite { path: PathBuf },
}

impl RuntimeDatabase {
    pub fn sqlite(path: impl Into<PathBuf>) -> Self {
        Self::Sqlite { path: path.into() }
    }

    pub fn sqlite_path(&self) -> &Path {
        match self {
            Self::Sqlite { path } => path,
        }
    }
}