[−][src]Enum horned_functional::Error
The error type for this crate.
Variants
PestError(Error<Rule>)
An error that occurred at the pest
parser level.
This is returned from any parsing methods when the input is written with invalid syntax, or when attempting to parse an incomplete input.
Example:
use horned_functional::FromFunctional; let res = Ontology::from_ofn_str("Ontology("); assert_matches!(res, Err(horned_functional::Error::PestError(_)));
IOError(Error)
An error that happened at the I/O level.
Example:
let res = horned_functional::from_file("/some/missing/file").map(|x| x.0); assert_matches!(res, Err(horned_functional::Error::IOError(_)));
ExpansionError(ExpansionError)
A CURIE expansion went wrong.
This error can be encountered in documents where a CURIE used an undefined prefix.
Example
use horned_functional::FromFunctional; let res = IRI::from_ofn_str("example:Entity"); assert_matches!(res, Err(horned_functional::Error::ExpansionError(_)));
InvalidFacet(String)
An unknown IRI was used as a facet.
Example
use horned_functional::FromFunctional; let res = Facet::from_ofn_str("<http://example.com/thing>"); assert_matches!(res, Err(horned_functional::Error::InvalidFacet(_)));
An unsupported construct was used.
See the relevant issue for each unsupported syntax construct; if the
issue has been resolved, please open an issue on the
fastobo/horned-functional
repository so that it can be fixed.
Trait Implementations
impl Debug for Error
[src]
impl Display for Error
[src]
impl Error for Error
[src]
fn description(&self) -> &str
[src]
fn cause(&self) -> Option<&dyn Error>
[src]
fn source(&self) -> Option<&(dyn Error + 'static)>
[src]
fn backtrace(&self) -> Option<&Backtrace>
[src]
impl From<Error<Rule>> for Error
[src]
impl From<Error> for Error
[src]
impl From<ExpansionError> for Error
[src]
fn from(e: ExpansionError) -> Self
[src]
Auto Trait Implementations
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> AsFail for T where
T: Fail,
T: Fail,
fn as_fail(&self) -> &(dyn Fail + 'static)
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<E> Fail for E where
E: 'static + Error + Send + Sync,
E: 'static + Error + Send + Sync,
fn name(&self) -> Option<&str>
fn cause(&self) -> Option<&(dyn Fail + 'static)>
fn backtrace(&self) -> Option<&Backtrace>
fn context<D>(self, context: D) -> Context<D> where
D: Display + Send + Sync + 'static,
D: Display + Send + Sync + 'static,
fn compat(self) -> Compat<Self>
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,