pub struct BundleContents {
pub files: Vec<BundleFile>,
pub unreadable: Vec<String>,
}Expand description
What a bundle carries that is not one of its concepts.
Fields§
§files: Vec<BundleFile>Every non-markdown file, ordered by path.
unreadable: Vec<String>Everything the walk could not inspect, so the inventory above is incomplete.
Reported rather than swallowed. An inventory that answers “none” because something would not open is the same false reassurance this feature exists to remove — a reader would take silence for absence, which is precisely what “0 violations” over an unread PDF did.
Three failures land here, not one: a directory that will not list, a
directory entry that will not yield, and an entry whose type cannot be
read. The first was the obvious case and the other two are the same defect
one level in — entries.flatten() and a let Ok(kind) = … else continue
each discard an error and leave is_complete() saying the walk saw
everything.
A file whose size cannot be read is not here: the file itself was
seen, named and reported, so the inventory is complete. See
BundleFile::bytes.
Implementations§
Source§impl BundleContents
impl BundleContents
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Whether the walk saw everything it tried to.
Trait Implementations§
Source§impl Clone for BundleContents
impl Clone for BundleContents
Source§fn clone(&self) -> BundleContents
fn clone(&self) -> BundleContents
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BundleContents
impl Debug for BundleContents
Source§impl Default for BundleContents
impl Default for BundleContents
Source§fn default() -> BundleContents
fn default() -> BundleContents
impl Eq for BundleContents
Source§impl PartialEq for BundleContents
impl PartialEq for BundleContents
Source§impl Serialize for BundleContents
impl Serialize for BundleContents
impl StructuralPartialEq for BundleContents
Auto Trait Implementations§
impl Freeze for BundleContents
impl RefUnwindSafe for BundleContents
impl Send for BundleContents
impl Sync for BundleContents
impl Unpin for BundleContents
impl UnsafeUnpin for BundleContents
impl UnwindSafe for BundleContents
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.