#[non_exhaustive]pub enum Error {
OutOfBounds {
pos: usize,
len: usize,
},
MissingParent {
op: OpId,
missing: OpId,
},
UnknownTarget {
op: OpId,
target: OpId,
},
ReplicaIdConflict {
op: OpId,
replica: ReplicaId,
},
ClockOverflow {
replica: ReplicaId,
},
}Expand description
Errors that can occur in abyo-crdt.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
OutOfBounds
Position is out of bounds for the current visible length.
MissingParent
A remote insertion referenced a parent that we have not seen.
In a correct event-graph delivery, parents are always delivered
before children. This error indicates the caller violated causal
delivery (e.g. by applying Ops out of order).
UnknownTarget
A delete op targets an item we have not seen.
ReplicaIdConflict
A remote op claims to come from this replica’s id. Two replicas must never share an id — if they do, every guarantee is off.
ClockOverflow
The Lamport clock would overflow u64. Practically never reachable
(~10¹⁹ ops per replica), but reported instead of silently wrapping.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
impl Eq for Error
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl UnwindSafe for Error
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