use thiserror::Error;
pub mod argument;
mod extensions;
mod file;
mod registry;
mod scalar_functions;
mod type_ast;
mod types;
pub use extensions::SimpleExtensions;
pub use file::ExtensionFile;
pub use registry::Registry;
pub use scalar_functions::{
Impl as ScalarFunctionImpl, NullabilityHandling, Options, ScalarFunction, VariadicBehavior,
};
pub use type_ast::TypeExpr;
pub use types::{ConcreteType, CustomType, ExtensionTypeError};
use crate::urn::Urn;
#[derive(Debug, Error)]
pub enum SimpleExtensionsError {
#[error("duplicate URNs in the registry: {0}")]
DuplicateUrn(Urn),
#[error("Extension type error: {0}")]
ExtensionTypeError(#[from] ExtensionTypeError),
#[error("Scalar function error: {0}")]
ScalarFunctionError(#[from] scalar_functions::ScalarFunctionError),
#[error("YAML parse error: {0}")]
YamlParse(#[from] serde_yaml::Error),
#[error("io error: {0}")]
Io(#[from] std::io::Error),
#[error("invalid urn")]
InvalidUrn(#[from] crate::urn::InvalidUrn),
#[error("Type '{type_name}' referenced in structure not found")]
UnresolvedTypeReference {
type_name: String,
},
#[error("duplicate type definition for `{name}`")]
DuplicateTypeName {
name: String,
},
}