pub enum AnchorError {
InvalidAnchor,
InvalidInsertionText,
InvalidSelection,
SegmentNotFound,
AmbiguousSegment,
NotFound,
Ambiguous {
count: usize,
},
InvalidIndices,
SuggestedContent,
UnsafeRange,
UnorderedRange,
}Expand description
Why an anchor or range cannot safely address an edit. Never contains prose.
Variants§
InvalidAnchor
The anchor is empty or contains a paragraph separator.
InvalidInsertionText
No characters would remain after the API strips unsupported input.
InvalidSelection
The segment selector is empty or inconsistent.
SegmentNotFound
No selected segment exists.
AmbiguousSegment
A segment ID identifies more than one segment.
NotFound
No selected text matches.
Ambiguous
More than one occurrence, including overlapping occurrences.
InvalidIndices
Missing or inconsistent server indices or tab identity.
SuggestedContent
The edit overlaps pending content suggestions.
UnsafeRange
The range crosses a structural boundary or includes a protected newline.
UnorderedRange
The second anchor precedes the first or is in another tab/container.
Trait Implementations§
Source§impl Clone for AnchorError
impl Clone for AnchorError
Source§impl Debug for AnchorError
impl Debug for AnchorError
impl Eq for AnchorError
Source§impl PartialEq for AnchorError
impl PartialEq for AnchorError
Source§impl Serialize for AnchorError
impl Serialize for AnchorError
impl StructuralPartialEq for AnchorError
Auto Trait Implementations§
impl Freeze for AnchorError
impl RefUnwindSafe for AnchorError
impl Send for AnchorError
impl Sync for AnchorError
impl Unpin for AnchorError
impl UnsafeUnpin for AnchorError
impl UnwindSafe for AnchorError
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<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
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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