pub struct VerLink { /* private fields */ }Expand description
A linked list tracking a logic “version” with compatibility rules:
- Append-only changes bump the version, the new version is backwards compatible.
- Non-append-only changes create a new version that is incompatible with all other versions (in the current process).
- Clones (cheaply) preserve the version.
Supported operations:
new() -> x: Create a new version that is not comparable (compatible) with other versions.clone(x) -> y: Clonextoy.x == y.xandyare compatible.bump(x) -> y: Bumpxtoy.y > x.yis backwards-compatible withx. Note:yis not comparable (compatible) with otherbump(x).x > y:trueifxis backwards compatible withy.
The linked list can be shared in other linked lists. So they form a tree effectively. Comparing to a DAG, there is no “merge” operation. Compatibility questions become reachability questions.
Implementations§
Trait Implementations§
Source§impl<'a> From<&'a VerLink> for DagVersion<'a>
impl<'a> From<&'a VerLink> for DagVersion<'a>
Source§impl<'a> From<&'a VerLink> for IdMapVersion<'a>
impl<'a> From<&'a VerLink> for IdMapVersion<'a>
Auto Trait Implementations§
impl Freeze for VerLink
impl RefUnwindSafe for VerLink
impl Send for VerLink
impl Sync for VerLink
impl Unpin for VerLink
impl UnwindSafe for VerLink
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more