macro_rules! impl_defaulted_eq {
($type:ty, $val:expr) => {
impl crate::Defaulted for $type
{
#[inline]
fn is_defaulted(&self) -> bool
{
*self == $val
}
}
};
}
macro_rules! impl_defaulted_empty {
($type:ty) => {
impl crate::Defaulted for $type
{
#[inline]
fn is_defaulted(&self) -> bool
{
self.is_empty()
}
}
};
}
macro_rules! impl_defaulted_deref {
(<$($gen:ident $(: $bound:path)?),*> for $type:ty) => {
impl<$($gen $(: $bound)?),*> crate::Defaulted for $type
where
T: crate::Defaulted + ?Sized,
{
#[inline]
fn is_defaulted(&self) -> bool
{
(**self).is_defaulted()
}
}
};
}
mod core_impls;
#[cfg(feature = "alloc")]
mod alloc_impls;
#[cfg(feature = "std")]
mod std_impls;
#[cfg(feature = "bytes")]
mod bytes_impls;
#[cfg(feature = "indexmap")]
mod indexmap_impls;
#[cfg(feature = "serde-json")]
mod serde_json_impls;
#[cfg(feature = "serde-yaml")]
mod serde_yaml_impls;
#[cfg(feature = "smallvec")]
mod smallvec_impls;