[−][src]Struct bufkit_data::Archive
The archive.
Methods
impl Archive
[src]
pub fn create<T>(root: T) -> Result<Self, BufkitDataErr> where
T: AsRef<Path>,
[src]
T: AsRef<Path>,
Initialize a new archive.
pub fn connect<T>(root: T) -> Result<Self, BufkitDataErr> where
T: AsRef<Path>,
[src]
T: AsRef<Path>,
Open an existing archive.
pub fn clean(
&self
) -> Result<(JoinHandle<Result<(), BufkitDataErr>>, Receiver<String>), BufkitDataErr>
[src]
&self
) -> Result<(JoinHandle<Result<(), BufkitDataErr>>, Receiver<String>), BufkitDataErr>
Validate files listed in the index are in the archive too, if not remove them from the index.
pub fn root(&self) -> &Path
[src]
Retrieve a path to the root. Allows caller to store files in the archive.
pub fn sites(&self) -> Result<Vec<Site>, BufkitDataErr>
[src]
Retrieve a list of sites in the archive.
pub fn site_info(&self, site_id: &str) -> Result<Site, BufkitDataErr>
[src]
Retrieve the information about a single site.
pub fn set_site_info(&self, site: &Site) -> Result<(), BufkitDataErr>
[src]
Modify a sites values.
pub fn add_site(&self, site: &Site) -> Result<(), BufkitDataErr>
[src]
Add a site to the list of sites.
pub fn site_exists(&self, site_id: &str) -> Result<bool, BufkitDataErr>
[src]
Check if a site already exists
pub fn init_times(
&self,
site_id: &str,
model: Model
) -> Result<Vec<NaiveDateTime>, BufkitDataErr>
[src]
&self,
site_id: &str,
model: Model
) -> Result<Vec<NaiveDateTime>, BufkitDataErr>
Get a list of all the available model initialization times for a given site and model.
pub fn count_init_times(
&self,
site_id: &str,
model: Model
) -> Result<i64, BufkitDataErr>
[src]
&self,
site_id: &str,
model: Model
) -> Result<i64, BufkitDataErr>
Get the number of values files in the archive for the model and intitialization time.
pub fn inventory(
&self,
site_id: &str,
model: Model
) -> Result<Inventory, BufkitDataErr>
[src]
&self,
site_id: &str,
model: Model
) -> Result<Inventory, BufkitDataErr>
Get an inventory of soundings for a site & model.
pub fn models(&self, site_id: &str) -> Result<Vec<Model>, BufkitDataErr>
[src]
Get a list of models in the archive for this site.
pub fn most_recent_valid_time(
&self,
site_id: &str,
model: Model
) -> Result<NaiveDateTime, BufkitDataErr>
[src]
&self,
site_id: &str,
model: Model
) -> Result<NaiveDateTime, BufkitDataErr>
Retrieve the model initialization time of the most recent model in the archive.
pub fn file_exists(
&self,
site_id: &str,
model: Model,
init_time: &NaiveDateTime
) -> Result<bool, BufkitDataErr>
[src]
&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 count(&self) -> Result<i64, BufkitDataErr>
[src]
Get the number of files stored in the archive.
pub fn add(
&self,
site_id: &str,
model: Model,
init_time: &NaiveDateTime,
text_data: &str
) -> Result<(), BufkitDataErr>
[src]
&self,
site_id: &str,
model: Model,
init_time: &NaiveDateTime,
text_data: &str
) -> Result<(), BufkitDataErr>
Add a bufkit file to the archive.
pub fn retrieve(
&self,
site_id: &str,
model: Model,
init_time: &NaiveDateTime
) -> Result<String, BufkitDataErr>
[src]
&self,
site_id: &str,
model: Model,
init_time: &NaiveDateTime
) -> Result<String, BufkitDataErr>
Retrieve a file from the archive.
pub fn most_recent_file(
&self,
site_id: &str,
model: Model
) -> Result<String, BufkitDataErr>
[src]
&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]
&self,
site_id: &str,
model: Model,
init_time: &NaiveDateTime
) -> String
Get the file name this would have if uncompressed.
pub fn remove(
&self,
site_id: &str,
model: Model,
init_time: &NaiveDateTime
) -> Result<(), BufkitDataErr>
[src]
&self,
site_id: &str,
model: Model,
init_time: &NaiveDateTime
) -> Result<(), BufkitDataErr>
Remove a file from the archive.
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,