pub enum CorpusError {
Io(Error),
BadHeader,
BadVersion,
MalformedInstance {
line: usize,
expected: usize,
found: usize,
},
ObjectParse {
line: usize,
interpretation: String,
message: String,
},
TreeParse {
line: usize,
message: String,
},
}Expand description
Errors returned while reading a corpus.
Variants§
Io(Error)
An I/O error occurred.
BadHeader
The header line did not match <prefix>IRTG (un)annotated corpus file, v1.0.
BadVersion
The header declared an unsupported corpus version.
MalformedInstance
An instance did not have the expected number of lines.
Fields
ObjectParse
An interpretation line could not be parsed by its algebra.
Fields
TreeParse
A derivation-tree line could not be parsed.
Trait Implementations§
Source§impl Debug for CorpusError
impl Debug for CorpusError
Source§impl Display for CorpusError
impl Display for CorpusError
Source§impl Error for CorpusError
impl Error for CorpusError
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 CorpusError
impl !UnwindSafe for CorpusError
impl Freeze for CorpusError
impl Send for CorpusError
impl Sync for CorpusError
impl Unpin for CorpusError
impl UnsafeUnpin for CorpusError
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