Struct bufkit_data::Archive [−][src]
pub struct Archive { /* fields omitted */ }The archive.
Methods
impl Archive[src]
impl Archivepub fn create_new<T>(root: T) -> Result<Self, BufkitDataErr> where
T: AsRef<Path>, [src]
pub fn create_new<T>(root: T) -> Result<Self, BufkitDataErr> where
T: AsRef<Path>, Initialize a new archive.
pub fn connect<T>(root: T) -> Result<Self, BufkitDataErr> where
T: AsRef<Path>, [src]
pub fn connect<T>(root: T) -> Result<Self, BufkitDataErr> where
T: AsRef<Path>, Open an existing archive.
pub fn get_root(&self) -> &Path[src]
pub fn get_root(&self) -> &PathRetrieve a path to the root. Allows caller to store files in the database.
pub fn get_sites(&self) -> Result<Vec<Site>, BufkitDataErr>[src]
pub fn get_sites(&self) -> Result<Vec<Site>, BufkitDataErr>Retrieve a list of sites in the archive.
pub fn get_site_info(&self, site_id: &str) -> Result<Site, BufkitDataErr>[src]
pub fn get_site_info(&self, site_id: &str) -> Result<Site, BufkitDataErr>Retrieve the information about a single site.
pub fn set_site_info(&self, site: &Site) -> Result<(), BufkitDataErr>[src]
pub fn set_site_info(&self, site: &Site) -> Result<(), BufkitDataErr>Modify a sites values.
pub fn add_site(&self, site: &Site) -> Result<(), BufkitDataErr>[src]
pub fn add_site(&self, site: &Site) -> Result<(), BufkitDataErr>Add a site to the list of sites.
pub fn site_exists(&self, site_id: &str) -> Result<bool, BufkitDataErr>[src]
pub fn site_exists(&self, site_id: &str) -> Result<bool, BufkitDataErr>Check if a site already exists
pub fn models_for_site(
&self,
site_id: &str
) -> Result<Vec<Model>, BufkitDataErr>[src]
pub fn models_for_site(
&self,
site_id: &str
) -> Result<Vec<Model>, BufkitDataErr>Get a list of models in the database for this site.
pub fn add_file(
&self,
site_id: &str,
model: Model,
init_time: &NaiveDateTime,
text_data: &str
) -> Result<(), BufkitDataErr>[src]
pub fn add_file(
&self,
site_id: &str,
model: Model,
init_time: &NaiveDateTime,
text_data: &str
) -> Result<(), BufkitDataErr>Add a bufkit file to the archive.
pub fn get_file(
&self,
site_id: &str,
model: Model,
init_time: &NaiveDateTime
) -> Result<String, BufkitDataErr>[src]
pub fn get_file(
&self,
site_id: &str,
model: Model,
init_time: &NaiveDateTime
) -> Result<String, BufkitDataErr>Retrieve a file from the archive.
pub fn get_most_recent_valid_time(
&self,
site_id: &str,
model: Model
) -> Result<NaiveDateTime, BufkitDataErr>[src]
pub fn get_most_recent_valid_time(
&self,
site_id: &str,
model: Model
) -> Result<NaiveDateTime, BufkitDataErr>Retrieve the model initialization time of the most recent model in the archive.
pub fn get_most_recent_file(
&self,
site_id: &str,
model: Model
) -> Result<String, BufkitDataErr>[src]
pub fn get_most_recent_file(
&self,
site_id: &str,
model: Model
) -> Result<String, BufkitDataErr>Retrieve the most recent file
pub fn file_name(
&self,
site_id: &str,
model: Model,
init_time: &NaiveDateTime
) -> String[src]
pub fn file_name(
&self,
site_id: &str,
model: Model,
init_time: &NaiveDateTime
) -> StringGet the file name this would have if uncompressed.
pub fn exists(
&self,
site_id: &str,
model: Model,
init_time: &NaiveDateTime
) -> Result<bool, BufkitDataErr>[src]
pub fn exists(
&self,
site_id: &str,
model: Model,
init_time: &NaiveDateTime
) -> Result<bool, BufkitDataErr>Check to see if a file is present in the archive and it is retrieveable.
pub fn get_inventory(
&self,
site_id: &str,
model: Model
) -> Result<Inventory, BufkitDataErr>[src]
pub fn get_inventory(
&self,
site_id: &str,
model: Model
) -> Result<Inventory, BufkitDataErr>Get an inventory of soundings for a site & model.