Struct starry::Db[][src]

pub struct Db {
    pub dir: PathBuf,
}

the database

Fields

dir: PathBuf

where the DB is on disk

Implementations

impl Db[src]

pub fn new() -> Result<Self>[src]

pub fn user_stars_dir(&self, user_id: &UserId) -> PathBuf[src]

pub fn last_user_obs(&self, user_id: &UserId) -> Result<Option<UserObs>>[src]

pub fn count_user_obs(&self, user_id: &UserId) -> Result<usize>[src]

pub fn extract_user(&self, user_id: &UserId) -> Result<Vec<DatedObs>>[src]

read in database the time serie made of the total numbers of stars of a user per date. Records are not sorted by date.

pub fn extract_user_query(
    &self,
    user_id: &UserId,
    repo_names: Vec<&str>
) -> Result<Vec<UserResponseLine>>
[src]

fetches and return the (unordered) lines, one per time, for the given user query

pub fn update(&mut self, conf: &Conf) -> Result<Vec<RepoChange>>[src]

Trait Implementations

impl Debug for Db[src]

Auto Trait Implementations

impl RefUnwindSafe for Db

impl Send for Db

impl Sync for Db

impl Unpin for Db

impl UnwindSafe for Db

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.