[−][src]Struct bufkit_data::Archive
The archive.
Implementations
impl Archive[src]
pub fn add(
&self,
site_id_hint: &str,
model: Model,
text_data: &str
) -> AddFileResult[src]
&self,
site_id_hint: &str,
model: Model,
text_data: &str
) -> AddFileResult
Add a bufkit file to the archive.
pub fn add_site(&self, site: &SiteInfo) -> Result<(), BufkitDataErr>[src]
Add a site to the list of sites.
If a site with this station number already exists, return an error from the underlying database.
pub fn update_site(&self, site: &SiteInfo) -> Result<(), BufkitDataErr>[src]
Modify a site's values.
pub fn remove(
&self,
station_num: StationNumber,
model: Model,
init_time: NaiveDateTime
) -> Result<(), BufkitDataErr>[src]
&self,
station_num: StationNumber,
model: Model,
init_time: NaiveDateTime
) -> Result<(), BufkitDataErr>
Remove a file from the archive.
pub fn remove_site(
&self,
station_num: StationNumber
) -> Result<(), BufkitDataErr>[src]
&self,
station_num: StationNumber
) -> Result<(), BufkitDataErr>
Remove a site and all of its files from the archive.
impl Archive[src]
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.
impl Archive[src]
pub fn station_summaries(&self) -> Result<Vec<StationSummary>, BufkitDataErr>[src]
Get a summary of all the stations in the archive.
impl Archive[src]
pub fn sites(&self) -> Result<Vec<SiteInfo>, BufkitDataErr>[src]
Retrieve a list of sites in the archive.
pub fn sites_and_ids_for(
&self,
model: Model
) -> Result<Vec<(SiteInfo, String)>, BufkitDataErr>[src]
&self,
model: Model
) -> Result<Vec<(SiteInfo, String)>, BufkitDataErr>
Retrieve the sites with their most recent station id for the given model.
pub fn site(&self, station_num: StationNumber) -> Option<SiteInfo>[src]
Retrieve the information about a single site id
pub fn models(
&self,
station_num: StationNumber
) -> Result<Vec<Model>, BufkitDataErr>[src]
&self,
station_num: StationNumber
) -> Result<Vec<Model>, BufkitDataErr>
Get a list of models in the archive for this site.
pub fn auto_downloads(&self) -> Result<Vec<DownloadInfo>, BufkitDataErr>[src]
Get a list of auto-download sites with the id to use to download them.
pub fn retrieve(
&self,
station_num: StationNumber,
model: Model,
init_time: NaiveDateTime
) -> Result<String, BufkitDataErr>[src]
&self,
station_num: StationNumber,
model: Model,
init_time: NaiveDateTime
) -> Result<String, BufkitDataErr>
Retrieve a file from the archive.
pub fn retrieve_most_recent(
&self,
station_num: StationNumber,
model: Model
) -> Result<String, BufkitDataErr>[src]
&self,
station_num: StationNumber,
model: Model
) -> Result<String, BufkitDataErr>
Retrieve the most recent file.
pub fn retrieve_all_valid_in(
&self,
station_num: StationNumber,
model: Model,
start: NaiveDateTime,
end: NaiveDateTime
) -> Result<impl Iterator<Item = String>, BufkitDataErr>[src]
&self,
station_num: StationNumber,
model: Model,
start: NaiveDateTime,
end: NaiveDateTime
) -> Result<impl Iterator<Item = String>, BufkitDataErr>
Retrieve all the soundings with any data valid between the start and end times.
pub fn file_exists(
&self,
site: StationNumber,
model: Model,
init_time: NaiveDateTime
) -> Result<bool, BufkitDataErr>[src]
&self,
site: StationNumber,
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 station_num_for_id(
&self,
id: &str,
model: Model
) -> Result<StationNumber, BufkitDataErr>[src]
&self,
id: &str,
model: Model
) -> Result<StationNumber, BufkitDataErr>
Retrieve the most recent station number used with this ID and model.
pub fn ids(
&self,
station_num: StationNumber,
model: Model
) -> Result<Vec<String>, BufkitDataErr>[src]
&self,
station_num: StationNumber,
model: Model
) -> Result<Vec<String>, BufkitDataErr>
Retrieve a list of site ids use with the station number.
pub fn most_recent_id(
&self,
station_num: StationNumber,
model: Model
) -> Result<Option<String>, BufkitDataErr>[src]
&self,
station_num: StationNumber,
model: Model
) -> Result<Option<String>, BufkitDataErr>
Retrieve the most recently used ID with a site.
pub fn inventory(
&self,
station_num: StationNumber,
model: Model
) -> Result<Vec<NaiveDateTime>, BufkitDataErr>[src]
&self,
station_num: StationNumber,
model: Model
) -> Result<Vec<NaiveDateTime>, BufkitDataErr>
Get an inventory of soundings for a site & model.
pub fn missing_inventory(
&self,
station_num: StationNumber,
model: Model,
time_range: Option<(NaiveDateTime, NaiveDateTime)>
) -> Result<Vec<NaiveDateTime>, BufkitDataErr>[src]
&self,
station_num: StationNumber,
model: Model,
time_range: Option<(NaiveDateTime, NaiveDateTime)>
) -> Result<Vec<NaiveDateTime>, BufkitDataErr>
Get list of missing init times.
If time_range is None, this will find the first and last entries and then look for any
gaps. If time_range is specified, then the end times are inclusive.
pub fn count(
&self,
station_num: StationNumber,
model: Model
) -> Result<u32, BufkitDataErr>[src]
&self,
station_num: StationNumber,
model: Model
) -> Result<u32, BufkitDataErr>
Get the number of files in the archive for the given station and model.
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 root(&self) -> &Path[src]
Retrieve a path to the root. Allows caller to store files in 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>,