pub struct DataSetView {
pub repo: DataRepoName,
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,
pub lines_ignored: Option<LineRange>,
}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: DataRepoNameThe 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: String§lines_ignored: Option<LineRange>A lines= given with this read, which a listing ignores: it reads
a file’s lines (0.105.0)
Implementations§
Source§impl DataSetView
impl DataSetView
Sourcepub fn top_level(&self) -> DataSetTopLevel
pub fn top_level(&self) -> DataSetTopLevel
The listing at its root: the files there to start with, and every directory rolled into one line (betas of 0.113.0: a set’s 128 wire files listed on every read, ~6k tok). The full listing is a directory’s read
Sourcepub fn one_level(&self) -> Vec<DataSetLine>
pub fn one_level(&self) -> Vec<DataSetLine>
The listing one level below directory (the view’s own, or the
root): its files, then one line per directory in it with its files
and bytes (betas of 0.113.0: a directory’s read listed its 135 files
recursively)
Sourcepub fn top_level_of(set: &DataSet) -> Option<Self>
pub fn top_level_of(set: &DataSet) -> Option<Self>
set as its default read lists it, on every surface: the
top_level’s files to start with, then one line
per directory. Every file is counted; a directory’s read lists them
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.