INNER CODE UNIT · Rust
not_impl
splitgraph/seafowl · src/catalog/mod.rs:114
fn not_impl<T>() -> CatalogResult<T> {
Err(CatalogError::NotImplemented {
reason: "Metastore method not supported".to_string(),
})
}
// TODO janky, we want to:
// - use the ? operator to avoid a lot of map_err
// - but there are 2 distinct error types, so we have to be able to convert them into a single type
// - don't want to impl From<serde_json::Error> for Error (since serde parse errors
// might not just be for FunctionDeserializationError)
//
// Currently, we have a struct that we automatically convert both errors into (storing their messages)
// and then use one map_err to make the final Error::FunctionDeserializationError.
//
// - could use Box<dyn Error>?
// - should maybe avoid just passing the to_string() of the error reason, but this is for internal
// use right now anyway (we made a mistake serializing the function into the DB, it's our fault)