Errors

  • file format 6
  • Rust SDK 1.0 preview

Every failure is an Error with a kind, a message and JSON details. The kind is the contract: one of 22 fixed strings, the same in every implementation.

On this page, Result<T> is std::result::Result<T, plxi_sdk::Error>.

Every public struct and enum with a public field or variant is marked #[non_exhaustive]: code outside the crate builds one through its constructors and matches an enum with a _ arm.

The 22 kinds

Each kind's meaning, the step that reports it, and its test cases are listed on plxi.org. Error kinds

Reserved shard_unsupported_spec and shard_quality_below_threshold are reserved; the SDK never returns them.

Nineteen kinds are named by the full specification. io, unsupported and internal come from implementations: a file that cannot be read, a feature this SDK does not have, and a defect in the SDK itself.

Structs

struct

Error

Spec §9
#[non_exhaustive]
#[derive(Debug, Clone, PartialEq)]
pub struct Error { /* private fields */ }

impl Display for Error
impl Error for Error
Summary

An SDK error: a kind, a message for people, and JSON details.

Enums

enum

ErrorKind

Spec §9
#[non_exhaustive]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub enum ErrorKind {
    Io,
    InvalidHeader,
    UnsupportedVersion,
    InvalidFooter,
    ChecksumMismatch,
    HeaderFooterMismatch,
    RecordCountMismatch,
    InvalidUtf8,
    InvalidRecord,
    Json,
    AppendixInvalid,
    AppendixCrcMismatch,
    AppendixAlignment,
    AppendixLegacyVersion,
    SectionTypeMismatch,
    DanglingEmbref,
    MergeConflict,
    ShardUnsupportedSpec,
    ShardQualityBelowThreshold,
    LimitExceeded,
    Unsupported,
    Internal,
}

impl Display for ErrorKind
Summary

The fixed, language-neutral name of a failure. A later release may add a kind; code matches with a _ arm.

Variants

Type aliases

© 2020-2026 Cintile Inc. All Rights Reserved.

Anyone may implement this format. Copying or republishing the text of this specification requires permission from Cintile Inc.

Sections