#[non_exhaustive]pub enum OpsCode {
Show 91 variants
InvalidInput,
UpstreamUnmapped,
InternalInvariant,
JsonParseFailed,
JsonSerializeFailed,
UnknownSchemaType,
PresetNotFound,
InputTooLarge,
AssetPlanMismatch,
AssetIdentityConflict,
DecodeFailed,
EncodeFailed,
EncodeSemanticLoss,
ValidationFailed,
MdDecodeFailed,
StyleStoreFailed,
NoFonts,
StyleRebindFailed,
AnalysisFailed,
GridAddrInvalid,
GridAddrProjectionFailed,
EmptyFieldValue,
FieldNotFound,
FieldNameAmbiguous,
FieldNotFillable,
FillFailed,
NoValues,
SectionOutOfRange,
SectionIndexMismatch,
PatchFailed,
SectionWorkflowFailed,
ReadTargetRequired,
ReadParasInvalid,
ReadParasWithoutSection,
ReadSectionOutOfRange,
ReadParaRangeInvalid,
ReadTableOutOfRange,
ReadFieldNotFound,
TableNotFound,
TableGridInvalid,
TableGridUnaddressable,
CellNotFound,
CellLabelAmbiguous,
CellHasNonTextContent,
CellTargetDuplicate,
CellTargetConflict,
InputNotRoundtripSafe,
InputEntriesNotCarried,
SetCellCodecFailed,
SetCellFailed,
InvalidSetCellArgs,
InvalidSetCellMap,
StampFailed,
StampCodecFailed,
StampManifestInvariant,
StampSourceHashMismatch,
StampDeltaMismatch,
StampCellNotAnchor,
StampCellNotEmpty,
StampLabelDrift,
StampCellNotCandidate,
StampCellTargetDuplicate,
StampNameEmpty,
StampHintBlank,
StampNameDuplicate,
StampNameCollision,
StampCandidateUncovered,
StampSpecStale,
StampMarkerMismatch,
StampSpecDuplicate,
InvalidStampMap,
MissingSourceSha256,
StructuralEditFailed,
StructuralCodec,
ParagraphOutOfRange,
DuplicateTarget,
ReferenceStranded,
HardBreakLoss,
EmptySection,
SectionPropertiesParagraph,
SpanCountMismatch,
SelfVerifyFailed,
MultiParagraphText,
InsertBeforeSectionProperties,
DeleteNoTarget,
InsertTextRequired,
Hwp5DecodeFailed,
Hwp5ConvertFailed,
UnrecognizedFormat,
PdfRenderFailed,
InvalidDiscovery,
}Expand description
Stable, machine-readable code for an operation failure class.
The string form (OpsCode::as_str) is the public contract that
CLI JSON errors, MCP tool errors and Python HwpForgeError.code
expose. Variants are additive; the enum is #[non_exhaustive], so
match on it with a wildcard arm outside this crate.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidInput
Arguments were syntactically valid but semantically unusable (mutually exclusive targets, empty lists, …).
UpstreamUnmapped
An upstream error variant that this table has no mapping for yet; the message keeps the original type name.
InternalInvariant
A library invariant was violated — a bug, not a user error.
JsonParseFailed
JSON input could not be parsed.
JsonSerializeFailed
A result could not be serialised to JSON.
UnknownSchemaType
Requested JSON schema kind does not exist.
PresetNotFound
Named style preset does not exist.
InputTooLarge
Input exceeds the accepted size limit.
AssetPlanMismatch
Provisioned assets do not line up with the document’s asset plan (missing, extra, duplicate or reordered occurrence).
AssetIdentityConflict
Two provisioned assets claim the same identity with different bytes.
DecodeFailed
HWPX package or XML could not be decoded.
EncodeFailed
HWPX (or Markdown) output could not be encoded.
EncodeSemanticLoss
A regenerating edit refused to emit bytes because encoding reported semantic-loss warnings (fail-closed).
ValidationFailed
Core document validation failed.
MdDecodeFailed
Markdown input could not be decoded.
StyleStoreFailed
Style store could not be built from the preset.
NoFonts
The document has no fonts, so a restyle has nothing to rebind.
StyleRebindFailed
Style references could not be rebound to the preset.
AnalysisFailed
Document analysis (inspect) failed.
GridAddrInvalid
A table cell grid address is invalid.
GridAddrProjectionFailed
A table grid could not be projected for addressing.
EmptyFieldValue
A field value was empty (clearing a field is unsupported).
FieldNotFound
Named field does not exist in the document.
FieldNameAmbiguous
Several fields share the requested name.
FieldNotFillable
The field exists but is not a fillable click-here field.
FillFailed
Fill workflow failed for another reason.
NoValues
No field values were supplied.
SectionOutOfRange
Requested section index is outside the document.
SectionIndexMismatch
Section index in the payload does not match the requested one.
PatchFailed
Preserving patch could not be applied.
SectionWorkflowFailed
Section export/patch workflow failed for another reason.
ReadTargetRequired
read needs exactly one target (section, paragraphs, table or field).
ReadParasInvalid
Paragraph range expression could not be parsed.
ReadParasWithoutSection
Paragraph range given without a section.
ReadSectionOutOfRange
read section index is outside the document.
ReadParaRangeInvalid
read paragraph range is outside the section.
ReadTableOutOfRange
read table ordinal is outside the document.
ReadFieldNotFound
read field name does not exist.
TableNotFound
Table ordinal does not exist.
TableGridInvalid
Table grid is malformed.
TableGridUnaddressable
Table grid cannot be addressed by label.
CellNotFound
Addressed cell does not exist.
CellLabelAmbiguous
Cell label matches more than one cell.
CellHasNonTextContent
Target cell contains non-text content that an edit would destroy.
CellTargetDuplicate
The same cell was targeted twice.
CellTargetConflict
Two cell specs resolve to conflicting targets.
InputNotRoundtripSafe
Input document is not round-trip safe, so a regenerating edit was refused.
InputEntriesNotCarried
ZIP entries of the input would be lost by re-encoding, so the edit was refused.
SetCellCodecFailed
Cell edit failed inside the codec.
SetCellFailed
Cell edit failed for another reason.
InvalidSetCellArgs
Cell edit arguments are inconsistent (single target and spec list mixed, …).
InvalidSetCellMap
Cell edit spec list is malformed.
StampFailed
Stamping failed for another reason.
StampCodecFailed
Stamping failed inside the codec.
StampManifestInvariant
Stamp manifest violated an invariant.
StampSourceHashMismatch
Stamp request was made for a different source document (hash mismatch).
StampDeltaMismatch
Stamp output failed self-verification.
StampCellNotAnchor
Cell stamp target is not the anchor of its merged region.
StampCellNotEmpty
Cell stamp target is not an empty cell.
StampLabelDrift
Cell label drifted since the plan was made.
StampCellNotCandidate
Cell stamp target is not a plan candidate.
StampCellTargetDuplicate
The same cell was stamped twice.
StampNameEmpty
Stamp field name is empty.
StampHintBlank
Cell stamp hint is blank.
StampNameDuplicate
Stamp field name is used twice in the request.
StampNameCollision
Stamp field name collides with an existing field.
StampCandidateUncovered
A plan candidate was neither named nor ignored.
StampSpecStale
Stamp spec no longer matches the document.
StampMarkerMismatch
Stamp marker text differs from the plan.
StampSpecDuplicate
The same span was specified twice.
InvalidStampMap
Stamp request payload is malformed.
MissingSourceSha256
A v2 stamp request lacks source_sha256.
StructuralEditFailed
Structural edit failed for another reason.
StructuralCodec
Structural edit failed inside the codec.
ParagraphOutOfRange
Paragraph index is outside the section.
DuplicateTarget
The same paragraph was targeted twice.
ReferenceStranded
Deleting would strand a reference (note, bookmark, …).
HardBreakLoss
Edit would lose a hard break.
EmptySection
Edit would leave a section empty.
SectionPropertiesParagraph
The section-properties paragraph cannot be edited.
SpanCountMismatch
Span count changed unexpectedly.
SelfVerifyFailed
Structural edit output failed self-verification.
MultiParagraphText
Inserted text spans several paragraphs where one is required.
InsertBeforeSectionProperties
Insertion before the section-properties paragraph is not allowed.
DeleteNoTarget
delete_para was given no target.
InsertTextRequired
insert_para was given no text.
Hwp5DecodeFailed
HWP5 input could not be decoded.
Hwp5ConvertFailed
HWP5 → HWPX conversion failed.
UnrecognizedFormat
Input bytes are neither HWP5 nor HWPX.
PdfRenderFailed
PDF rendering failed (the renderer’s own code is carried as the cause).
InvalidDiscovery
Font discovery mode is not one of the accepted values.
Implementations§
Trait Implementations§
impl Copy for OpsCode
Source§impl<'de> Deserialize<'de> for OpsCode
impl<'de> Deserialize<'de> for OpsCode
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
impl Eq for OpsCode
impl StructuralPartialEq for OpsCode
Auto Trait Implementations§
impl Freeze for OpsCode
impl RefUnwindSafe for OpsCode
impl Send for OpsCode
impl Sync for OpsCode
impl Unpin for OpsCode
impl UnsafeUnpin for OpsCode
impl UnwindSafe for OpsCode
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.