pub struct DataSetView {
pub repo: String,
pub commit: GitCommitId,
pub files: u64,
pub bytes: u64,
pub index: DataFilePath,
pub directory: Option<String>,
pub listing: Vec<DataSetLine>,
pub unlisted: u64,
pub asked: Option<String>,
pub how_to_read: String,
}Expand description
A data set’s files as a read shows them: no hashes (those are in the
record, detail="full_with_attachments", and each file read’s header),
rolled up by directory when one line per file would not fit (0.91)
Fields§
§repo: StringThe data repository’s name
commit: GitCommitId§files: u64Files in the whole set
bytes: u64Their bytes, added up
index: DataFilePathThe file to read first
directory: Option<String>The directory listed, ending in /; absent for the whole set
listing: Vec<DataSetLine>A file, or a directory (ending in /) standing for every file under it
unlisted: u64Files under directory on no line: the listing ran past the budget
asked: Option<String>The attachment= asked for, when it is not directory: a path
relative to a directory at the repository root, resolved (0.91.4)
how_to_read: StringImplementations§
Source§impl DataSetView
impl DataSetView
Sourcepub fn read_first(index: &DataFilePath) -> String
pub fn read_first(index: &DataFilePath) -> String
The one sentence that names a set’s index file, in
how_to_read and in a server’s summary of the
entry; a read that carries both says it once (0.91.4)
Sourcepub fn of(set: &DataSet, directory: Option<&str>, budget: usize) -> Option<Self>
pub fn of(set: &DataSet, directory: Option<&str>, budget: usize) -> Option<Self>
set’s files under directory (a path prefix ending in /, or the
whole set), one line each if they fit in budget bytes. Else rolled
up by directory, as deep as fits: one line per file or directory
just below directory, then a level further down while that still
fits, so a set whose files sit under one directory shows what is in
it rather than one line (0.91.4). Else as many of the top lines as
fit. None when no file is under directory.
Trait Implementations§
Source§impl Clone for DataSetView
impl Clone for DataSetView
Source§impl Debug for DataSetView
impl Debug for DataSetView
Source§impl<'de> Deserialize<'de> for DataSetView
impl<'de> Deserialize<'de> for DataSetView
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>,
impl Eq for DataSetView
Source§impl PartialEq for DataSetView
impl PartialEq for DataSetView
Source§impl Serialize for DataSetView
impl Serialize for DataSetView
impl StructuralPartialEq for DataSetView
Auto Trait Implementations§
impl Freeze for DataSetView
impl RefUnwindSafe for DataSetView
impl Send for DataSetView
impl Sync for DataSetView
impl Unpin for DataSetView
impl UnsafeUnpin for DataSetView
impl UnwindSafe for DataSetView
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
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
key and return true if they are equal.