pub struct MetaTable { /* private fields */ }Expand description
The rows a writer intends to seal into the archive’s META_MODULE section.
A MetaTable that exists but holds no rows is a real, meaningful thing: it
seals a present, empty index, which reads back as
ArchiveMeta::Index(_) with is_empty() == true — “I searched, and this
archive genuinely records nothing”, as opposed to NoMetadata.
Implementations§
Source§impl MetaTable
impl MetaTable
pub fn new() -> Self
pub fn from_rows(rows: Vec<MetaEntry>) -> Self
Sourcepub fn insert(
&mut self,
relative_path: impl Into<String>,
key: impl Into<String>,
value: impl Into<MetaValue>,
) -> &mut Self
pub fn insert( &mut self, relative_path: impl Into<String>, key: impl Into<String>, value: impl Into<MetaValue>, ) -> &mut Self
Attach a typed fact to one archive entry.
Sourcepub fn insert_archive(
&mut self,
key: impl Into<String>,
value: impl Into<MetaValue>,
) -> &mut Self
pub fn insert_archive( &mut self, key: impl Into<String>, value: impl Into<MetaValue>, ) -> &mut Self
Attach a typed fact to the archive as a whole.
pub fn extend(&mut self, rows: impl IntoIterator<Item = MetaEntry>) -> &mut Self
pub fn rows(&self) -> &[MetaEntry]
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl<'de> Deserialize<'de> for MetaTable
impl<'de> Deserialize<'de> for MetaTable
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 MetaTable
Auto Trait Implementations§
impl Freeze for MetaTable
impl RefUnwindSafe for MetaTable
impl Send for MetaTable
impl Sync for MetaTable
impl Unpin for MetaTable
impl UnsafeUnpin for MetaTable
impl UnwindSafe for MetaTable
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