use bytemuck::Pod;
use core::fmt::Debug;
pub trait PodValue:
Copy + Debug + Default + PartialEq + Pod + Send + Sync + Sized + Serializable + 'static
{
}
impl<T> PodValue for T where
T: Copy + Debug + Default + PartialEq + Pod + Send + Sync + Serializable + 'static
{
}
#[cfg(not(feature = "serde"))]
pub trait Serializable {}
#[cfg(feature = "serde")]
pub trait Serializable: serde::Serialize + for<'de> serde::Deserialize<'de> {}
#[cfg(feature = "serde")]
const _: () = {
impl<T> Serializable for T where T: serde::Serialize + for<'de> serde::Deserialize<'de> {}
};
#[cfg(not(feature = "serde"))]
const _: () = {
impl<T> Serializable for T {}
};
#[cfg(all(not(target_arch = "wasm32"), feature = "wasmtime"))]
pub trait WasmComponentType:
wasmtime::component::ComponentType + wasmtime::component::Lower + wasmtime::component::Lift
{
}
#[cfg(any(target_arch = "wasm32", not(feature = "wasmtime")))]
pub trait WasmComponentType {}
#[cfg(all(not(target_arch = "wasm32"), feature = "wasmtime"))]
impl<T> WasmComponentType for T where
T: wasmtime::component::ComponentType + wasmtime::component::Lower + wasmtime::component::Lift
{
}
#[cfg(any(target_arch = "wasm32", not(feature = "wasmtime")))]
impl<T> WasmComponentType for T {}
#[cfg(feature = "facet")]
#[doc(no_inline)]
pub use facet::Facet;
#[cfg(not(feature = "facet"))]
pub trait Facet<'a> {}
#[cfg(not(feature = "facet"))]
impl<'a, T: 'a> Facet<'a> for T {}