#[doc(hidden)]
pub mod __internal {
pub use ::core as core_export;
#[cfg(feature = "serde")]
pub use serde2 as serde;
pub use crate::{
repr::{ArrayRepr, EnumSetTypeRepr},
traits::EnumSetTypePrivate,
};
}
#[macro_export]
macro_rules! enum_set {
($(|)*) => {
EnumSet::empty()
};
($value:path $(|)*) => {
{
#[allow(deprecated)] let value = $value.__impl_enumset_internal__const_only();
value
}
};
($value:path | $($rest:path)|* $(|)*) => {
$crate::enum_set_union!($value, $($rest,)*)
};
}
#[macro_export]
macro_rules! enum_set_union {
($value:path $(,)?) => {
$crate::enum_set!($value)
};
($value:path, $($rest:path),* $(,)?) => {
{
#[allow(deprecated)] let helper = $value.__impl_enumset_internal__const_helper();
#[allow(deprecated)] let value = $value.__impl_enumset_internal__const_only();
$(#[allow(deprecated)] let value = {
let new = $rest.__impl_enumset_internal__const_only();
helper.const_union(value, new)
};)*
value
}
};
}
#[macro_export]
macro_rules! enum_set_intersection {
($value:path $(,)?) => {
$crate::enum_set!($value)
};
($value:path, $($rest:path),* $(,)?) => {
{
#[allow(deprecated)] let helper = $value.__impl_enumset_internal__const_helper();
#[allow(deprecated)] let value = $value.__impl_enumset_internal__const_only();
$(#[allow(deprecated)] let value = {
let new = $rest.__impl_enumset_internal__const_only();
helper.const_intersection(value, new)
};)*
value
}
};
}
#[macro_export]
macro_rules! enum_set_complement {
($value:path $(,)?) => {{
#[allow(deprecated)]
let helper = $value.__impl_enumset_internal__const_helper();
#[allow(deprecated)]
let value = $value.__impl_enumset_internal__const_only();
helper.const_complement(value)
}};
}
#[macro_export]
macro_rules! enum_set_difference {
($value:path $(,)?) => {
$crate::enum_set!($value)
};
($value:path, $($rest:path),* $(,)?) => {
{
#[allow(deprecated)] let helper = $value.__impl_enumset_internal__const_helper();
#[allow(deprecated)] let value = $value.__impl_enumset_internal__const_only();
$(#[allow(deprecated)] let value = {
let new = $rest.__impl_enumset_internal__const_only();
helper.const_intersection(value, helper.const_complement(new))
};)*
value
}
};
}
#[macro_export]
macro_rules! enum_set_symmetric_difference {
($value:path $(,)?) => {
$crate::enum_set!($value)
};
($value:path, $($rest:path),* $(,)?) => {
{
#[allow(deprecated)] let helper = $value.__impl_enumset_internal__const_helper();
#[allow(deprecated)] let value = $value.__impl_enumset_internal__const_only();
$(#[allow(deprecated)] let value = {
let new = $rest.__impl_enumset_internal__const_only();
helper.const_symmetric_difference(value, new)
};)*
value
}
};
}