Trait openqasm::GenericError
source · [−]Expand description
A trait to convert a specific result type into a generic one.
This lets you convert Result<T, E> or Result<T, Vec<E>> into
Result<T, Errors> for any error type E defined in this library.
In this way you can ignore the specific type of error when you don’t
need to handle them explicitly (which is most of the time).
Example Usage:
ⓘ
fn test() -> Result<(), Errors> {
...
let program = parser.done().to_errors()?;
program.type_check().to_errors()?;
}