Skip to main content

str_enum_base

Macro str_enum_base 

Source
macro_rules! str_enum_base {
    ($(#[error_type($error_ty:ident)])? $(#[derive($($derive_trait:ident),* $(,)?)])? $(#[repr($repr:ty)])? $vis:vis enum $ty:ident { $($variant:ident $(= $variant_repr:literal)? => $val:literal $(($($other_valid:literal),* $(,)?))?),* $(,)? }) => { ... };
    (AsRef $self:ident, [$($other:ty),*]) => { ... };
    (From $self:ident, [$($other:ty),*]) => { ... };
    (From 'a $self:ident, [$($other:ty),*]) => { ... };
    (FromIterator $self:ident, [$($other:ty),*]) => { ... };
    (FromIterator 'a $self:ident, [$($other:ty),*]) => { ... };
    (PartialEq $self:ident, [$($other:ty),*]) => { ... };
    (PartialEq 'a $self:ident, [$($other:ty),*]) => { ... };
    (PartialOrd $self:ident, [$($other:ty),*]) => { ... };
    (PartialOrd 'a $self:ident, [$($other:ty),*]) => { ... };
    (FromStr $(#[error_type($error_ty:ident)])? $(#[derive($($derive_trait:ident),* $(,)?)])? $(#[repr($repr:ty)])? $vis:vis enum $ty:ident { $($variant:ident $(= $variant_repr:literal)? => $val:literal $(($($other_valid:literal),* $(,)?))?),* $(,)? }) => { ... };
}