pub enum ApplyError {
Show 16 variants
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,
},
DeltaBaseMismatch {
expected: usize,
actual: usize,
},
IslandSlotInInsert,
AnchorIdCollision {
id: String,
},
EmptyAnchorId,
UnknownIslandId {
id: String,
},
IslandIdCollision {
id: String,
},
EmptyIslandId,
IslandInsertOutOfRange {
at: Usv,
len: Usv,
},
BlockIslandNotAlone {
at: Usv,
},
NestingTooDeep {
line: usize,
depth: usize,
max: usize,
},
BadHeadingLevel {
line: usize,
level: u8,
},
}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
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, which would leave a slot
with no backing Island. Islands are created through
IslandOp::Insert, never a text splice, so a whole-field splice
carrying slots must be split into a slot-stripped delta plus one
IslandOp::Insert per slot.
AnchorIdCollision
A MarkOp::Add of an anchor whose id is already live in the field.
Rejected rather than replaced (which would retarget a live thread) or
coexisting (which RemoveAnchor cannot disambiguate).
EmptyAnchorId
A MarkOp::Add of an anchor with the empty id.
UnknownIslandId
An IslandOp::Set naming an id no island in the field carries.
IslandIdCollision
An IslandOp::Insert whose id is already live in the field. Set
addresses by id, so a duplicate is an island neither op can name.
EmptyIslandId
An IslandOp::Insert carrying the empty id.
IslandInsertOutOfRange
An IslandOp::Insert whose at is past the end of the text the delta
and this bundle’s earlier island ops left.
BlockIslandNotAlone
An island op would leave a block-only island’s slot
(IslandType::block_only, a
table) sharing its line with other content. Markdown writes such an
island by breaking the line around it, so the op that lands one mid-line
is refused rather than restructuring the author’s blocks. at is the
slot’s position.
NestingTooDeep
A LineOp::SetContainers nested a line deeper than
MAX_NESTING_DEPTH.
BadHeadingLevel
A LineOp::SetKind naming a heading level outside 1..=6. Refused
because normalize does not repair it: the level reaches export as that
many #, which CommonMark reads back as a literal-hash paragraph.
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.