Struct brevdash_data::Repository [−][src]
Definition of a brevdash data repository.
Fields
description: RootDescription
The root description string.
Implementations
impl Repository
[src]
pub fn open<P: AsRef<Path>>(path: P) -> Result<Self>
[src]
Open a repository from a directory path.
pub fn create<P: AsRef<Path>>(
path: P,
description: RootDescription
) -> Result<Self>
[src]
path: P,
description: RootDescription
) -> Result<Self>
Create a repository at a directory path.
The directory must already exist and be writable.
pub fn store_description(&self) -> Result<()>
[src]
Store the description file inside the repository.
pub fn project_datapoint_characteristic_artifacts_directory_path(
&self,
project_id: &str,
date: NaiveDate,
characteristic_id: &str
) -> PathBuf
[src]
&self,
project_id: &str,
date: NaiveDate,
characteristic_id: &str
) -> PathBuf
Get the path for the artifacts of a characteristic at a specific date.
pub fn project_datapoint_characteristic_artifact_path(
&self,
project_id: &str,
date: NaiveDate,
characteristic_id: &str,
artifact_relative_path: &Path
) -> PathBuf
[src]
&self,
project_id: &str,
date: NaiveDate,
characteristic_id: &str,
artifact_relative_path: &Path
) -> PathBuf
Get the path for an artifact.
pub fn load_project_ids(&self) -> Result<Vec<String>>
[src]
Load the list of project ids inside the repository.
pub fn has_project(&self, project_id: &str) -> bool
[src]
Query whether the repository contains a project with a specific id.
pub fn store_project_description(
&self,
project_id: &str,
description: &ProjectDescription
) -> Result<()>
[src]
&self,
project_id: &str,
description: &ProjectDescription
) -> Result<()>
Store the description of a project.
pub fn load_project_description(
&self,
project_id: &str
) -> Result<ProjectDescription>
[src]
&self,
project_id: &str
) -> Result<ProjectDescription>
Load the description of a project by id.
pub fn load_project_descriptions(
&self
) -> Result<BTreeMap<String, ProjectDescription>>
[src]
&self
) -> Result<BTreeMap<String, ProjectDescription>>
Load the descriptions for all projects.
pub fn project_has_datapoint_date(
&self,
project_id: &str,
date: NaiveDate
) -> bool
[src]
&self,
project_id: &str,
date: NaiveDate
) -> bool
Query whether the repository contains a datapoint at a specific date.
pub fn load_project_datapoint_dates(
&self,
project_id: &str
) -> Result<Vec<NaiveDate>>
[src]
&self,
project_id: &str
) -> Result<Vec<NaiveDate>>
Load a list of all datapoint dates for a specific project id.
pub fn store_project_datapoint(
&self,
project_id: &str,
date: NaiveDate,
datapoint: &DataPoint
) -> Result<()>
[src]
&self,
project_id: &str,
date: NaiveDate,
datapoint: &DataPoint
) -> Result<()>
Store a datapoint at a specific date.
pub fn load_project_datapoint(
&self,
project_id: &str,
date: NaiveDate
) -> Result<DataPoint>
[src]
&self,
project_id: &str,
date: NaiveDate
) -> Result<DataPoint>
Load a datapoint at a specific date.
pub fn load_project_datapoints(
&self,
project_id: &str
) -> Result<BTreeMap<NaiveDate, DataPoint>>
[src]
&self,
project_id: &str
) -> Result<BTreeMap<NaiveDate, DataPoint>>
Load all datapoints for a project id.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Repository
impl Send for Repository
impl Sync for Repository
impl Unpin for Repository
impl UnwindSafe for Repository
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,