pub struct NetworkSnapshot { /* private fields */ }Expand description
Immutable versioned view of a links network.
Implementations§
Source§impl NetworkSnapshot
impl NetworkSnapshot
Sourcepub fn new(
version: u64,
network: LinkNetwork,
provenance: impl Into<String>,
) -> Self
pub fn new( version: u64, network: LinkNetwork, provenance: impl Into<String>, ) -> Self
Creates an immutable snapshot from a network value.
Sourcepub const fn parent_version(&self) -> Option<u64>
pub const fn parent_version(&self) -> Option<u64>
Parent version when this snapshot was committed from a mutable snapshot.
Sourcepub fn provenance(&self) -> &str
pub fn provenance(&self) -> &str
Human-readable change provenance for this snapshot.
Sourcepub fn network(&self) -> &LinkNetwork
pub fn network(&self) -> &LinkNetwork
Immutable network data held by this snapshot.
Number of immutable snapshot handles sharing the same network value.
Sourcepub fn to_mutable(
&self,
provenance: impl Into<String>,
) -> MutableNetworkSnapshot
pub fn to_mutable( &self, provenance: impl Into<String>, ) -> MutableNetworkSnapshot
Creates an editable snapshot fork from this immutable snapshot.
Trait Implementations§
Source§impl Clone for NetworkSnapshot
impl Clone for NetworkSnapshot
Source§fn clone(&self) -> NetworkSnapshot
fn clone(&self) -> NetworkSnapshot
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NetworkSnapshot
impl Debug for NetworkSnapshot
impl Eq for NetworkSnapshot
Source§impl PartialEq for NetworkSnapshot
impl PartialEq for NetworkSnapshot
Source§fn eq(&self, other: &NetworkSnapshot) -> bool
fn eq(&self, other: &NetworkSnapshot) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for NetworkSnapshot
Auto Trait Implementations§
impl Freeze for NetworkSnapshot
impl RefUnwindSafe for NetworkSnapshot
impl Send for NetworkSnapshot
impl Sync for NetworkSnapshot
impl Unpin for NetworkSnapshot
impl UnsafeUnpin for NetworkSnapshot
impl UnwindSafe for NetworkSnapshot
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