#[non_exhaustive]pub enum TextEditError {
Show 15 variants
StaleMatch {
match_id: MatchId,
reason: StaleReason,
},
InvalidMatchId {
reason: String,
},
InvalidQuery {
reason: String,
},
OverlappingEdits {
a: MatchId,
b: MatchId,
},
DuplicateStage {
match_id: MatchId,
},
UnsupportedContainer {
match_id: MatchId,
kind: UnsupportedContainer,
},
UnsupportedStyleSpan {
match_id: MatchId,
detail: String,
},
EncodingFailed {
match_id: Option<MatchId>,
font: String,
detail: String,
},
FontFallbackDenied {
match_id: Option<MatchId>,
font: String,
detail: String,
},
TaggedTextConflict {
match_id: MatchId,
visual_text: String,
actual_text: String,
},
SignedDocumentRejected {
signatures: Vec<SignatureSummary>,
},
PermissionsDenied,
UnsupportedFitPolicy {
policy: FitPolicy,
},
Document(ManipError),
Internal {
detail: String,
},
}Expand description
Typed errors of the text-edit engine.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
StaleMatch
The locator does not resolve against the current document revision.
InvalidMatchId
The token could not be decoded or failed strict validation.
InvalidQuery
The query is malformed (e.g. empty needle).
OverlappingEdits
Two staged edits overlap in the same container.
DuplicateStage
The same match was staged twice.
UnsupportedContainer
The match lives in a container the engine cannot edit yet.
UnsupportedStyleSpan
The match spans text with differing font/size/style.
EncodingFailed
Replacement (or retained) text could not be encoded.
Fields
FontFallbackDenied
The original font cannot encode the replacement and the policy is
FontFallback::Deny.
Fields
TaggedTextConflict
The match is covered by /ActualText (design §7).
Fields
SignedDocumentRejected
The document carries digital signatures and the policy is
SignaturePolicy::RejectSignedDocuments.
Fields
signatures: Vec<SignatureSummary>The signatures found.
PermissionsDenied
Document permissions forbid content modification.
UnsupportedFitPolicy
The requested fit policy is not implemented in this phase.
Document(ManipError)
Underlying document error.
Internal
Invariant violation — please report.
Trait Implementations§
Source§impl Debug for TextEditError
impl Debug for TextEditError
Source§impl Display for TextEditError
impl Display for TextEditError
Source§impl Error for TextEditError
impl Error for TextEditError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<ManipError> for TextEditError
impl From<ManipError> for TextEditError
Source§fn from(source: ManipError) -> Self
fn from(source: ManipError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for TextEditError
impl !UnwindSafe for TextEditError
impl Freeze for TextEditError
impl Send for TextEditError
impl Sync for TextEditError
impl Unpin for TextEditError
impl UnsafeUnpin for TextEditError
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> 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> ⓘ
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> ⓘ
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
T, using the provided data to resolve any offsets.