pub struct MetaEntry {
pub relative_path: Option<String>,
pub key: String,
pub value: MetaValue,
}Expand description
One metadata row: a typed value under key, attached either to one archive
entry (relative_path = Some(..)) or to the archive itself (None).
Fields§
§relative_path: Option<String>The archive entry this fact is about; None = archive-level metadata.
key: String§value: MetaValueImplementations§
Source§impl MetaEntry
impl MetaEntry
pub fn entry( relative_path: impl Into<String>, key: impl Into<String>, value: impl Into<MetaValue>, ) -> Self
pub fn archive(key: impl Into<String>, value: impl Into<MetaValue>) -> Self
Sourcepub fn path(&self) -> Option<&str>
pub fn path(&self) -> Option<&str>
The archive entry this row points at, if it is entry-scoped. Hand this to
locate_file or
ZnippyArchive::extract_file to pull
only that entry’s bytes — which is the whole point of searching an
index instead of extracting an archive.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for MetaEntry
impl<'de> Deserialize<'de> for MetaEntry
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 StructuralPartialEq for MetaEntry
Auto Trait Implementations§
impl Freeze for MetaEntry
impl RefUnwindSafe for MetaEntry
impl Send for MetaEntry
impl Sync for MetaEntry
impl Unpin for MetaEntry
impl UnsafeUnpin for MetaEntry
impl UnwindSafe for MetaEntry
Blanket Implementations§
impl<T> Allocation for T
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