Struct starry::UserObs [−][src]
a user observation is what’s stored as a file in database. There’s one per (user, time) and it contains the counts of stars of all repos of that user on that time.
Fields
user_id: UserId
time: DateTime<Utc>
counts: Vec<RepoObs>
Implementations
impl UserObs
[src]
impl UserObs
[src]pub fn write_in_dir(&self, user_dir: &Path) -> Result<()>
[src]
pub fn filename_date(path: &Path) -> Option<DateTime<Utc>>
[src]
if the file has a name matching the userobs filename format (date.csv), then returns this date
pub fn read_file(
file_path: &Path,
user_id: UserId,
time: DateTime<Utc>
) -> Result<Self>
[src]
file_path: &Path,
user_id: UserId,
time: DateTime<Utc>
) -> Result<Self>
pub fn read_line(file_path: &Path, repo_name: &str) -> Result<Option<RepoObs>>
[src]
pub fn read_lines_and_sum(
file_path: &Path,
repo_names: &[&str]
) -> Result<(Vec<Option<usize>>, usize)>
[src]
file_path: &Path,
repo_names: &[&str]
) -> Result<(Vec<Option<usize>>, usize)>
pub fn sum(&self) -> DatedObs
[src]
pub fn repo_count(&self, repo_name: &str) -> Option<usize>
[src]
pub fn diff_from(&self, old_uo: &Self) -> Vec<RepoChange>
[src]
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for UserObs
impl RefUnwindSafe for UserObs
impl UnwindSafe for UserObs
impl UnwindSafe for UserObs
Blanket Implementations
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]