#[non_exhaustive]pub enum XbrlError {
Malformed(Box<dyn StdError + Send + Sync + 'static>),
NotXbrl(String),
ValueConversion {
field: String,
concept: String,
value: String,
target_type: &'static str,
},
}Expand description
What can go wrong reading a document, or a struct from one.
The parser is lenient by design: real filings carry malformed HTML, unknown entities and unclosed tags, and it steps over all of those. An error here means the document could not be read at all.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Malformed(Box<dyn StdError + Send + Sync + 'static>)
The markup is broken at a point the parser cannot step over.
NotXbrl(String)
The document is well-formed, but it is not XBRL: an XML document with
no <xbrl> root, say.
ValueConversion
A fact’s value does not convert to the type of the field bound to it:
a filer tagging N/A under a numeric concept.
Document::extract fails on the first of
these; Document::extract_lenient
leaves the field empty and returns them alongside the struct.
Trait Implementations§
Source§impl Error for XbrlError
impl Error for XbrlError
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()
Auto Trait Implementations§
impl !RefUnwindSafe for XbrlError
impl !UnwindSafe for XbrlError
impl Freeze for XbrlError
impl Send for XbrlError
impl Sync for XbrlError
impl Unpin for XbrlError
impl UnsafeUnpin for XbrlError
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