pub struct DataSet {
pub agora_data_set: u32,
pub title: String,
pub description: String,
pub compiled_by: String,
pub repo: String,
pub commit: GitCommitId,
pub index: DataFilePath,
pub files: Vec<DataFile>,
}Expand description
The data of a data_set entry. See the module docs.
Unknown keys are tolerated, as on a record: a stored manifest also
carries the writer’s _blind.
Fields§
§agora_data_set: u32Always DATA_SET_VERSION
title: String§description: StringWhat the data is, where it came from and how to read it (markdown)
compiled_by: StringWho compiled it, in their own words
repo: StringThe data repository’s name, as it is cloned (agora-data)
commit: GitCommitIdThe commit every file is read at
index: DataFilePathThe file a reader should open first; one of files
files: Vec<DataFile>Every file a server may serve, sorted by path
Implementations§
Source§impl DataSet
impl DataSet
Sourcepub fn validate(&self) -> Result<(), &'static str>
pub fn validate(&self) -> Result<(), &'static str>
What a writer refuses to sign: another version, a blank text field, no files, paths out of order or repeated, an index that is not listed, or a note that is blank or more than one line
Sourcepub fn file(&self, path: &DataFilePath) -> Option<&DataFile>
pub fn file(&self, path: &DataFilePath) -> Option<&DataFile>
The listed file at path, if it is listed
Sourcepub fn total_bytes(&self) -> u64
pub fn total_bytes(&self) -> u64
Every file’s size, added up
Trait Implementations§
Source§impl<'de> Deserialize<'de> for DataSet
impl<'de> Deserialize<'de> for DataSet
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
impl Eq for DataSet
impl StructuralPartialEq for DataSet
Auto Trait Implementations§
impl Freeze for DataSet
impl RefUnwindSafe for DataSet
impl Send for DataSet
impl Sync for DataSet
impl Unpin for DataSet
impl UnsafeUnpin for DataSet
impl UnwindSafe for DataSet
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.