pub struct RegistryIndex {
pub version: String,
pub datasets: Vec<DatasetInfo>,
}Expand description
Registry index containing all dataset information.
The index is stored as JSON and contains metadata for all datasets in the registry.
§Example JSON
{
"version": "1.0",
"datasets": [
{
"name": "mnist",
"versions": ["1.0.0", "1.0.1"],
"latest": "1.0.1",
"size_bytes": 11490000,
"num_rows": 70000,
"schema": { ... },
"metadata": { ... }
}
]
}Fields§
§version: StringIndex format version.
datasets: Vec<DatasetInfo>List of all datasets in the registry.
Implementations§
Source§impl RegistryIndex
impl RegistryIndex
Sourcepub fn find(&self, name: &str) -> Option<&DatasetInfo>
pub fn find(&self, name: &str) -> Option<&DatasetInfo>
Finds a dataset by name.
Sourcepub fn find_mut(&mut self, name: &str) -> Option<&mut DatasetInfo>
pub fn find_mut(&mut self, name: &str) -> Option<&mut DatasetInfo>
Finds a dataset by name (mutable).
Trait Implementations§
Source§impl Clone for RegistryIndex
impl Clone for RegistryIndex
Source§fn clone(&self) -> RegistryIndex
fn clone(&self) -> RegistryIndex
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RegistryIndex
impl Debug for RegistryIndex
Source§impl Default for RegistryIndex
impl Default for RegistryIndex
Source§impl<'de> Deserialize<'de> for RegistryIndex
impl<'de> Deserialize<'de> for RegistryIndex
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for RegistryIndex
impl RefUnwindSafe for RegistryIndex
impl Send for RegistryIndex
impl Sync for RegistryIndex
impl Unpin for RegistryIndex
impl UnsafeUnpin for RegistryIndex
impl UnwindSafe for RegistryIndex
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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 moreCreates a shared type from an unshared type.