pub enum ModelError {
Truncated,
Magic,
Version,
SourceHash,
LanguageCount,
Alphabet,
WordCount,
Offsets,
Word,
Order,
TrailingBytes,
}Expand description
Structural reason an asset was rejected; carries no asset content.
Variants§
Truncated
The asset ends before a declared section.
Magic
Wrong magic bytes.
Version
Unsupported format version.
SourceHash
Source identity differs from the frozen model (consistency, not authenticity).
LanguageCount
Unexpected number of languages.
Alphabet
Alphabet differs from the frozen language table.
WordCount
Entry count differs from the frozen language table.
Offsets
Word offsets do not start at zero, or a word is empty or longer than MAX_MODEL_WORD.
Word
A word contains an index outside its alphabet.
Order
Words are not strictly increasing in UTF-16 order.
TrailingBytes
Bytes remain after the last section.
Trait Implementations§
Source§impl Clone for ModelError
impl Clone for ModelError
Source§fn clone(&self) -> ModelError
fn clone(&self) -> ModelError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ModelError
Source§impl Debug for ModelError
impl Debug for ModelError
Source§impl Display for ModelError
impl Display for ModelError
impl Eq for ModelError
Source§impl Error for ModelError
impl Error for ModelError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for ModelError
impl PartialEq for ModelError
impl StructuralPartialEq for ModelError
Auto Trait Implementations§
impl Freeze for ModelError
impl RefUnwindSafe for ModelError
impl Send for ModelError
impl Sync for ModelError
impl Unpin for ModelError
impl UnsafeUnpin for ModelError
impl UnwindSafe for ModelError
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