pub enum UnidicArtifactPayloadError {
Show 26 variants
Io(Error),
Yaml(Error),
InvalidBinaryMagic {
magic: [u8; 8],
},
UnsupportedBinaryVersion {
version: u32,
},
NonZeroBinaryReserved {
value: u32,
},
TruncatedBinary {
field: &'static str,
},
InvalidBinaryUtf8 {
field: &'static str,
source: FromUtf8Error,
},
BinaryValueTooLarge {
field: &'static str,
len: usize,
},
BinaryEntryCountTooLarge {
entries: u64,
},
ArtifactLimitExceeded {
field: &'static str,
len: u64,
max: u64,
},
InvalidIndexedMagic {
magic: [u8; 8],
},
UnsupportedIndexedVersion {
version: u32,
},
NonZeroIndexedReserved {
value: u32,
},
TruncatedIndexed {
field: &'static str,
},
InvalidIndexedFst {
message: String,
},
IndexedSectionTooLarge {
field: &'static str,
len: u64,
},
InvalidIndexedOffset {
offset: u64,
},
InvalidIndexedUtf8 {
field: &'static str,
source: Utf8Error,
},
IndexedEntryCountMismatch {
header_entries: usize,
fst_entries: usize,
},
UnsupportedSchemaVersion {
version: u32,
},
UnsupportedPayloadType {
payload_type: String,
},
EmptySurface {
entry_index: usize,
},
DuplicateSurface {
surface: String,
},
EmptyReadings {
surface: String,
},
EmptyReading {
surface: String,
reading_index: usize,
},
DuplicateReading {
surface: String,
reading: String,
},
}Expand description
Errors returned while reading or validating UniDic artifact payloads.
Variants§
Io(Error)
Filesystem or reader error.
Yaml(Error)
YAML parser error.
InvalidBinaryMagic
Binary payload magic did not match the expected value.
UnsupportedBinaryVersion
Binary payload version is not supported.
NonZeroBinaryReserved
Reserved binary header field was non-zero.
TruncatedBinary
Binary payload ended before a field could be read.
InvalidBinaryUtf8
Binary payload contained invalid UTF-8.
BinaryValueTooLarge
Binary field length exceeded supported bounds.
BinaryEntryCountTooLarge
Binary payload entry count exceeded supported bounds.
ArtifactLimitExceeded
Artifact payload exceeded a configured safety limit.
Fields
InvalidIndexedMagic
Indexed payload magic did not match the expected value.
UnsupportedIndexedVersion
Indexed payload version is not supported.
NonZeroIndexedReserved
Reserved indexed header field was non-zero.
TruncatedIndexed
Indexed payload ended before a section could be read.
InvalidIndexedFst
Indexed payload contained an invalid FST section.
IndexedSectionTooLarge
Indexed payload section length exceeded supported bounds.
InvalidIndexedOffset
Indexed payload referenced an invalid readings offset.
InvalidIndexedUtf8
Indexed payload contained invalid UTF-8.
IndexedEntryCountMismatch
Indexed header entry count disagreed with the FST entry count.
Fields
UnsupportedSchemaVersion
YAML payload schema version is not supported.
UnsupportedPayloadType
YAML payload type is not a UniDic reading index.
EmptySurface
Payload entry had an empty surface form.
DuplicateSurface
Surface form appeared more than once.
EmptyReadings
Payload entry had no readings.
EmptyReading
Payload entry contained an empty reading.
Fields
DuplicateReading
Payload entry contained the same reading more than once.
Trait Implementations§
Source§impl Debug for UnidicArtifactPayloadError
impl Debug for UnidicArtifactPayloadError
Source§impl Display for UnidicArtifactPayloadError
impl Display for UnidicArtifactPayloadError
Source§impl Error for UnidicArtifactPayloadError
impl Error for UnidicArtifactPayloadError
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()