pub enum AttributeError {
UnknownAttributeCode(TryFromPrimitiveError<AttributeCode>),
UnknownAttributeKind(TryFromPrimitiveError<AttributeKind>),
WrongBlock(AttributeCode),
TooShort,
BadString,
UnknownAttributeId(TryFromPrimitiveError<AttributeId>),
AttributeMalformed(&'static str, AttributeId),
IntAttributeUnsupported(AttributeId),
BadAttributeGroup(u32),
GroupTooShort(AttributeCode, usize),
GroupSizeMismatch(usize, usize),
Map(MapError),
}Expand description
Errors that can occur when mapping attribute blocks.
Variants§
UnknownAttributeCode(TryFromPrimitiveError<AttributeCode>)
An unknown record code was seen.
UnknownAttributeKind(TryFromPrimitiveError<AttributeKind>)
An unknown attribute kind (format) was seen.
WrongBlock(AttributeCode)
The given code was seen in an unexpected block.
TooShort
The attribute couldn’t be constructed because of missing fields.
BadString
The attribute has an invalid string key or string balue.
UnknownAttributeId(TryFromPrimitiveError<AttributeId>)
The attribute has an unknown (integral) ID.
AttributeMalformed(&'static str, AttributeId)
The attribute’s ID doesn’t match the format supplied.
IntAttributeUnsupported(AttributeId)
We recognize the attribute’s ID as an integer attribute, but we don’t support it yet.
BadAttributeGroup(u32)
An entry record asked for a nonexistent attribute group.
GroupTooShort(AttributeCode, usize)
An attribute group record was too short.
GroupSizeMismatch(usize, usize)
Parsing an attribute group didn’t fully consume the underlying record fields.
Map(MapError)
A generic mapping error occured.
Trait Implementations§
Source§impl Debug for AttributeError
impl Debug for AttributeError
Source§impl Display for AttributeError
impl Display for AttributeError
Source§impl Error for AttributeError
impl Error for AttributeError
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 From<AttributeError> for ModuleError
impl From<AttributeError> for ModuleError
Source§fn from(source: AttributeError) -> Self
fn from(source: AttributeError) -> Self
Converts to this type from the input type.
Source§impl From<MapError> for AttributeError
impl From<MapError> for AttributeError
Source§impl From<TryFromPrimitiveError<AttributeCode>> for AttributeError
impl From<TryFromPrimitiveError<AttributeCode>> for AttributeError
Source§fn from(source: TryFromPrimitiveError<AttributeCode>) -> Self
fn from(source: TryFromPrimitiveError<AttributeCode>) -> Self
Converts to this type from the input type.
Source§impl From<TryFromPrimitiveError<AttributeId>> for AttributeError
impl From<TryFromPrimitiveError<AttributeId>> for AttributeError
Source§fn from(source: TryFromPrimitiveError<AttributeId>) -> Self
fn from(source: TryFromPrimitiveError<AttributeId>) -> Self
Converts to this type from the input type.
Source§impl From<TryFromPrimitiveError<AttributeKind>> for AttributeError
impl From<TryFromPrimitiveError<AttributeKind>> for AttributeError
Source§fn from(source: TryFromPrimitiveError<AttributeKind>) -> Self
fn from(source: TryFromPrimitiveError<AttributeKind>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for AttributeError
impl RefUnwindSafe for AttributeError
impl Send for AttributeError
impl Sync for AttributeError
impl Unpin for AttributeError
impl UnwindSafe for AttributeError
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