pub trait Exportable {
// Required method
fn export_internal() -> impl Serializable;
// Provided methods
fn get_type_name() -> String { ... }
fn export() -> Box<dyn Serializable> { ... }
fn export_with_recursion_check() -> Box<dyn Serializable> { ... }
}Expand description
A trait for types that can be exported into Arri schemas.
Required Methods§
Sourcefn export_internal() -> impl Serializable
fn export_internal() -> impl Serializable
Internal method for exporting the type.
This method should be implemented by types to define their specific export logic.
Provided Methods§
Sourcefn get_type_name() -> String
fn get_type_name() -> String
Retrieves the type name of the implementing type.
Sourcefn export() -> Box<dyn Serializable>
fn export() -> Box<dyn Serializable>
Exports the type into a serializable schema.
This method ensures that recursive types are handled correctly.
Sourcefn export_with_recursion_check() -> Box<dyn Serializable>
fn export_with_recursion_check() -> Box<dyn Serializable>
Exports the type with recursion tracking to prevent infinite loops.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.