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.
Trait Implementations§
Source§impl Clone for DatasetRegistry
impl Clone for DatasetRegistry
Source§fn clone(&self) -> DatasetRegistry
fn clone(&self) -> DatasetRegistry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
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
Mutably borrows from an owned value. Read more