pub struct Snapshot {
pub contexts: BTreeMap<String, BTreeMap<NameComponent, StoredBinding>>,
}Expand description
The whole state of a naming service: its contexts by id, and the bindings of each context by name component.
Fields§
§contexts: BTreeMap<String, BTreeMap<NameComponent, StoredBinding>>The contexts and their bindings.
Implementations§
Source§impl Snapshot
impl Snapshot
Sourcepub fn apply(&mut self, change: &Change)
pub fn apply(&mut self, change: &Change)
Applies change. A change is applied the same way whatever the
state, so replaying a log over a newer checkpoint gives the same
result: creating a context that exists keeps its bindings, binding
in a context that does not exist creates it, and unbinding or
destroying what does not exist does nothing.
Trait Implementations§
impl Eq for Snapshot
impl StructuralPartialEq for Snapshot
Auto Trait Implementations§
impl Forget for Snapshot
impl Freeze for Snapshot
impl Move for Snapshot
impl RefUnwindSafe for Snapshot
impl Send for Snapshot
impl Sync for Snapshot
impl Unpin for Snapshot
impl UnsafeUnpin for Snapshot
impl UnwindSafe for Snapshot
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