pub struct DatasetRegistry { /* private fields */ }Expand description
Registry client with verified downloads and a managed local cache.
Implementations§
Source§impl DatasetRegistry
impl DatasetRegistry
Sourcepub fn from_defaults() -> Result<Self>
pub fn from_defaults() -> Result<Self>
Resolves the registry source and cache directory from environment and platform defaults.
Sourcepub fn new(
registry_url: impl Into<String>,
cache_dir: impl Into<PathBuf>,
) -> Result<Self>
pub fn new( registry_url: impl Into<String>, cache_dir: impl Into<PathBuf>, ) -> Result<Self>
Creates a registry using explicit source and cache values.
Sourcepub fn registry_url(&self) -> &str
pub fn registry_url(&self) -> &str
Returns the configured registry URL, file URL, or filesystem path.
Sourcepub fn list(&self) -> Result<Vec<DatasetListing>>
pub fn list(&self) -> Result<Vec<DatasetListing>>
Fetches the registry and reports whether each current version is cached.
Sourcepub fn download(&self, id: &str) -> Result<PathBuf>
pub fn download(&self, id: &str) -> Result<PathBuf>
Downloads, verifies, validates, and caches the current version of id.
An already-valid current installation is returned unchanged.
Sourcepub fn download_all(&self) -> Result<Vec<PathBuf>>
pub fn download_all(&self) -> Result<Vec<PathBuf>>
Downloads every registry entry sequentially and stops on the first error.
Sourcepub fn open(&self, id: &str) -> Result<Dataset>
pub fn open(&self, id: &str) -> Result<Dataset>
Opens id, downloading it first when necessary.
A corrupt current installation is removed and installed once more.
Sourcepub fn open_spectral(&self, id: &str) -> Result<SpectralDataset>
pub fn open_spectral(&self, id: &str) -> Result<SpectralDataset>
Opens an explicit spectral registry profile, downloading a registered ID if needed.
Uses the same verified archive and managed cache as ordinary data. Version-one
profiles must use open; local converted profiles use DatasetLoader::load_spectral.
Trait Implementations§
Source§impl Clone for DatasetRegistry
impl Clone for DatasetRegistry
Source§fn clone(&self) -> DatasetRegistry
fn clone(&self) -> DatasetRegistry
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for DatasetRegistry
impl RefUnwindSafe for DatasetRegistry
impl Send for DatasetRegistry
impl Sync for DatasetRegistry
impl Unpin for DatasetRegistry
impl UnsafeUnpin for DatasetRegistry
impl UnwindSafe for DatasetRegistry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more