pub enum ApplyError {
MarkOutOfRange {
start: Usv,
end: Usv,
len: Usv,
},
LineOutOfRange {
line: usize,
lines: usize,
},
SplitPositionOutOfRange {
at: Usv,
len: Usv,
},
SplitAtNewline {
at: Usv,
},
LineCountMismatch {
lines: usize,
segments: usize,
},
FirstLineContinues,
DeltaBaseMismatch {
expected: usize,
actual: usize,
},
IslandSlotInInsert,
AnchorIdCollision {
id: String,
},
EmptyAnchorId,
}Expand description
Why an apply failed — range or line index out of bounds, or invariants broken before normalization could repair them.
Variants§
MarkOutOfRange
LineOutOfRange
SplitPositionOutOfRange
SplitAtNewline
LineCountMismatch
FirstLineContinues
A LineOp::SetContinues tried to set continues: true on line 0, which
has nothing before it to continue — the apply-time twin of the
Invariant::FirstLineContinues
validation error, refused here because normalize does not repair it.
DeltaBaseMismatch
The text delta’s expected base length disagreed with the content — it was built against a different revision.
IslandSlotInInsert
An Op::Insert carried a raw ISLAND_SLOT. Islands are structurally
uneditable through the text channel — a slot inserted here would have no
backing Island, an orphaned-slot invariant violation. Islands are
created through their own channel, never a text splice.
AnchorIdCollision
A MarkOp::Add of an anchor whose id is already live in the field.
An anchor id is a caller-supplied handle, unique per Content
(DOCUMENT_STORAGE.md § Anchor-id identity); add rejects a collision
rather than replace (which would silently retarget a live thread) or
coexist (which RemoveAnchor cannot disambiguate). The op-time twin of
Invariant::AnchorIdCollision.
EmptyAnchorId
A MarkOp::Add of an anchor with the empty id — a degenerate handle,
refused so every anchor carries a usable referent.
Trait Implementations§
Source§impl Clone for ApplyError
impl Clone for ApplyError
Source§fn clone(&self) -> ApplyError
fn clone(&self) -> ApplyError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ApplyError
impl Debug for ApplyError
impl Eq for ApplyError
Source§impl PartialEq for ApplyError
impl PartialEq for ApplyError
impl StructuralPartialEq for ApplyError
Auto Trait Implementations§
impl Freeze for ApplyError
impl RefUnwindSafe for ApplyError
impl Send for ApplyError
impl Sync for ApplyError
impl Unpin for ApplyError
impl UnsafeUnpin for ApplyError
impl UnwindSafe for ApplyError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.