[−][src]Struct bufkit_data::Archive
The archive.
Methods
impl Archive[src]
pub fn create(root: &dyn AsRef<Path>) -> Result<Self, BufkitDataErr>[src]
Initialize a new archive.
pub fn connect(root: &dyn AsRef<Path>) -> Result<Self, BufkitDataErr>[src]
Open an existing archive.
pub fn clean(&self) -> Result<(), BufkitDataErr>[src]
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, station_num: u32) -> Option<Site>[src]
Retrieve the information about a single site id
pub fn site_for_id(&self, site_id: &str) -> Option<Site>[src]
Given a site_id string, get the corresponding Site object.
pub fn id_for_site(&self, site: &Site) -> Option<String>[src]
Given a site, get the current ID used for that site.
pub fn set_site_info(&self, site: &Site) -> Result<(), BufkitDataErr>[src]
Modify a site's values.
pub fn add_site(&self, site: &Site) -> Result<(), BufkitDataErr>[src]
Add a site to the list of sites.
pub fn site_exists(&self, station_num: u32) -> Result<bool, BufkitDataErr>[src]
Check if a site already exists
pub fn init_times(
&self,
site: &Site,
model: Model
) -> Result<Vec<NaiveDateTime>, BufkitDataErr>[src]
&self,
site: &Site,
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: &Site,
model: Model
) -> Result<i64, BufkitDataErr>[src]
&self,
site: &Site,
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: &Site,
model: Model
) -> Result<Inventory, BufkitDataErr>[src]
&self,
site: &Site,
model: Model
) -> Result<Inventory, BufkitDataErr>
Get an inventory of soundings for a site & model.
pub fn models(&self, site: &Site) -> Result<Vec<Model>, BufkitDataErr>[src]
Get a list of models in the archive for this site.
pub fn most_recent_init_time(
&self,
site: &Site,
model: Model
) -> Result<NaiveDateTime, BufkitDataErr>[src]
&self,
site: &Site,
model: Model
) -> Result<NaiveDateTime, BufkitDataErr>
Retrieve the model initialization time of the most recent model in the archive.
pub fn init_times_for_soundings_valid_between(
&self,
start: NaiveDateTime,
end: NaiveDateTime,
site: &Site,
model: Model
) -> Result<Vec<NaiveDateTime>, BufkitDataErr>[src]
&self,
start: NaiveDateTime,
end: NaiveDateTime,
site: &Site,
model: Model
) -> Result<Vec<NaiveDateTime>, BufkitDataErr>
Retrieve all the initialization times of all sounding files that have a sounding with a valid time in the specified range (inclusive).
pub fn file_exists(
&self,
site: &Site,
model: Model,
init_time: &NaiveDateTime
) -> Result<bool, BufkitDataErr>[src]
&self,
site: &Site,
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: &Site,
model: Model,
init_time: NaiveDateTime,
end_time: NaiveDateTime,
text_data: &str
) -> Result<(), BufkitDataErr>[src]
&self,
site: &Site,
model: Model,
init_time: NaiveDateTime,
end_time: NaiveDateTime,
text_data: &str
) -> Result<(), BufkitDataErr>
Add a bufkit file to the archive.
pub fn retrieve(
&self,
site: &Site,
model: Model,
init_time: NaiveDateTime
) -> Result<String, BufkitDataErr>[src]
&self,
site: &Site,
model: Model,
init_time: NaiveDateTime
) -> Result<String, BufkitDataErr>
Retrieve a file from the archive.
pub fn most_recent_file(
&self,
site: &Site,
model: Model
) -> Result<String, BufkitDataErr>[src]
&self,
site: &Site,
model: Model
) -> Result<String, BufkitDataErr>
Retrieve the most recent file
pub fn retrieve_all_valid_in(
&self,
start: NaiveDateTime,
end: NaiveDateTime,
site: &Site,
model: Model
) -> Result<Vec<String>, BufkitDataErr>[src]
&self,
start: NaiveDateTime,
end: NaiveDateTime,
site: &Site,
model: Model
) -> Result<Vec<String>, BufkitDataErr>
Retrieve all the soundings with data valid between the start and end times.
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: &Site,
model: Model,
init_time: &NaiveDateTime
) -> Result<(), BufkitDataErr>[src]
&self,
site: &Site,
model: Model,
init_time: &NaiveDateTime
) -> Result<(), BufkitDataErr>
Remove a file from the archive.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Archive
impl Send for Archive
impl !Sync for Archive
impl Unpin for Archive
impl !UnwindSafe for Archive
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,
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.
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>,