pub struct Archive {
pub paths: IndexMap<CompactString, Archive>,
pub values: IndexMap<CompactString, Value>,
}Fields§
§paths: IndexMap<CompactString, Archive>Every ‘~’ prefixed keys
values: IndexMap<CompactString, Value>All elements except child path nodes.
Implementations§
source§impl Archive
impl Archive
pub fn find_path<'s, 'a>( &'s self, path: impl IntoIterator<Item = &'a str> ) -> Option<&'s Archive>
pub fn find_or_create_path_mut<'s, 'a>( &'s mut self, path: impl IntoIterator<Item = &'a str> ) -> &'s mut Archive
sourcepub fn create_patch(&self, newer: &mut Self) -> Self
pub fn create_patch(&self, newer: &mut Self) -> Self
Creates archive which contains only the differences between two archives. This does not affect to removed categories/values of newer archive.
Patched elements are removed from newer archive.
pub fn is_empty(&self) -> bool
pub fn merge_from(&mut self, other: Self)
pub fn merge(self, other: Self) -> Self
Trait Implementations§
source§impl<'a> Deserialize<'a> for Archive
impl<'a> Deserialize<'a> for Archive
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'a>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where D: Deserializer<'a>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq<Archive> for Archive
impl PartialEq<Archive> for Archive
impl StructuralPartialEq for Archive
Auto Trait Implementations§
impl RefUnwindSafe for Archive
impl Send for Archive
impl Sync for Archive
impl Unpin for Archive
impl UnwindSafe for Archive
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
Mutably borrows from an owned value. Read more