#[repr(u32)]pub enum ErrorCode {
InvalidHwpUnit = 1_000,
InvalidColor = 1_001,
IndexOutOfBounds = 1_002,
EmptyIdentifier = 1_003,
InvalidField = 1_004,
ParseError = 1_005,
}Expand description
Numeric error codes for programmatic handling and FFI.
Foundation errors occupy the 1000-1999 range.
§Examples
use hwpforge_foundation::ErrorCode;
let code = ErrorCode::InvalidHwpUnit;
assert_eq!(code as u32, 1000);Variants§
InvalidHwpUnit = 1_000
HwpUnit value out of valid range.
InvalidColor = 1_001
Color component or raw value invalid.
IndexOutOfBounds = 1_002
Branded index exceeded collection bounds.
EmptyIdentifier = 1_003
String identifier was empty or invalid.
InvalidField = 1_004
Generic field validation failure.
ParseError = 1_005
String-to-enum parsing failure.
Trait Implementations§
impl Copy for ErrorCode
impl Eq for ErrorCode
impl StructuralPartialEq for ErrorCode
Auto Trait Implementations§
impl Freeze for ErrorCode
impl RefUnwindSafe for ErrorCode
impl Send for ErrorCode
impl Sync for ErrorCode
impl Unpin for ErrorCode
impl UnwindSafe for ErrorCode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.