Exportable

Trait Exportable 

Source
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§

Source

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§

Source

fn get_type_name() -> String

Retrieves the type name of the implementing type.

Source

fn export() -> Box<dyn Serializable>

Exports the type into a serializable schema.

This method ensures that recursive types are handled correctly.

Source

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.

Implementations on Foreign Types§

Source§

impl Exportable for &str

Source§

impl Exportable for IpAddr

Source§

impl Exportable for SocketAddr

Source§

impl Exportable for bool

Source§

impl Exportable for char

Source§

impl Exportable for f32

Source§

impl Exportable for f64

Source§

impl Exportable for i8

Source§

impl Exportable for i16

Source§

impl Exportable for i32

Source§

impl Exportable for i64

Source§

impl Exportable for u8

Source§

impl Exportable for u16

Source§

impl Exportable for u32

Source§

impl Exportable for u64

Source§

impl Exportable for ()

Source§

impl Exportable for String

Source§

impl Exportable for Ipv4Addr

Source§

impl Exportable for Ipv6Addr

Source§

impl Exportable for NonZero<i8>

Source§

impl Exportable for NonZero<i16>

Source§

impl Exportable for NonZero<i32>

Source§

impl Exportable for NonZero<i64>

Source§

impl Exportable for NonZero<isize>

Source§

impl Exportable for NonZero<u8>

Source§

impl Exportable for NonZero<u16>

Source§

impl Exportable for NonZero<u32>

Source§

impl Exportable for NonZero<u64>

Source§

impl Exportable for NonZero<usize>

Source§

impl Exportable for AtomicBool

Source§

impl Exportable for AtomicI8

Source§

impl Exportable for AtomicI16

Source§

impl Exportable for AtomicI32

Source§

impl Exportable for AtomicI64

Source§

impl Exportable for AtomicU8

Source§

impl Exportable for AtomicU16

Source§

impl Exportable for AtomicU32

Source§

impl Exportable for AtomicU64

Source§

impl Exportable for Duration

Source§

impl Exportable for OsStr

Source§

impl Exportable for OsString

Source§

impl Exportable for Path

Source§

impl Exportable for PathBuf

Source§

impl Exportable for Instant

Source§

impl Exportable for SystemTime

Source§

impl<K, V> Exportable for BTreeMap<K, V>
where K: 'static + Exportable + ToString, V: 'static + Exportable,

Source§

impl<K, V> Exportable for HashMap<K, V>
where K: 'static + Exportable + ToString, V: 'static + Exportable,

Source§

impl<T> Exportable for Option<T>
where T: 'static + Exportable,

Source§

impl<T> Exportable for [T]
where T: 'static + Exportable,

Source§

impl<T> Exportable for Box<T>
where T: 'static + Exportable,

Source§

impl<T> Exportable for BinaryHeap<T>
where T: 'static + Exportable,

Source§

impl<T> Exportable for BTreeSet<T>
where T: 'static + Exportable,

Source§

impl<T> Exportable for LinkedList<T>
where T: 'static + Exportable,

Source§

impl<T> Exportable for VecDeque<T>
where T: 'static + Exportable,

Source§

impl<T> Exportable for Rc<T>
where T: 'static + Exportable,

Source§

impl<T> Exportable for Arc<T>
where T: 'static + Exportable,

Source§

impl<T> Exportable for Vec<T>
where T: 'static + Exportable,

Source§

impl<T> Exportable for Cell<T>
where T: 'static + Exportable,

Source§

impl<T> Exportable for RefCell<T>
where T: 'static + Exportable,

Source§

impl<T> Exportable for NonNull<T>
where T: 'static + Exportable,

Source§

impl<T> Exportable for HashSet<T>
where T: 'static + Exportable,

Source§

impl<T> Exportable for Mutex<T>
where T: 'static + Exportable,

Source§

impl<T> Exportable for RwLock<T>
where T: 'static + Exportable,

Source§

impl<T, E> Exportable for Result<T, E>
where T: 'static + Exportable, E: 'static + Exportable,

Implementors§