use crate::{Types, datatype::DataType};
mod impls;
mod legacy_impls;
mod macros;
#[diagnostic::on_unimplemented(
message = "the trait `specta::Type` is not implemented for `{Self}`",
label = "`{Self}` must implement `Type`",
note = "Depending on your use case, this can be fixed in multiple ways:
- If your using an type defined in one of your own crates, ensure you have `#[derive(specta::Type)]` on it.
- If your using a crate with official Specta support, enable the matching feature flag on the `specta` crate.
- If your using an external crate without Specta support, you may need to wrap your type in a new-type wrapper.
"
)]
pub trait Type {
fn definition(types: &mut Types) -> DataType;
}