Don't use an enum for anchors and model min/max more implicitly
This will make it easier to serialize an anchor.
This commit is contained in:
parent
cbe136c0cb
commit
67686dd1c2
3 changed files with 115 additions and 140 deletions
|
@ -21,6 +21,15 @@ pub struct Lamport {
|
|||
}
|
||||
|
||||
impl Local {
|
||||
pub const MIN: Self = Self {
|
||||
replica_id: ReplicaId::MIN,
|
||||
value: Seq::MIN,
|
||||
};
|
||||
pub const MAX: Self = Self {
|
||||
replica_id: ReplicaId::MAX,
|
||||
value: Seq::MAX,
|
||||
};
|
||||
|
||||
pub fn new(replica_id: ReplicaId) -> Self {
|
||||
Self {
|
||||
replica_id,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue