forked from Orchid/orchid
Macro system done in theory
too afraid to begin debugging, resting for a moment
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/// A shorthand for mapping over enums with identical structure. Used for
|
||||
/// A shorthand for mapping over enums with similar structure. Used for
|
||||
/// converting between owned enums and the corresponding API enums that only
|
||||
/// differ in the type of their fields.
|
||||
///
|
||||
@@ -7,7 +7,11 @@
|
||||
/// match_mapping!(self, ThisType => OtherType {
|
||||
/// EmptyVariant,
|
||||
/// TupleVariant(foo => intern(foo), bar.clone()),
|
||||
/// StructVariant{ a.to_api(), b }
|
||||
/// StructVariant{ a.to_api(), b },
|
||||
/// DedicatedConverter(value () convert)
|
||||
/// } {
|
||||
/// ThisType::DimorphicVariant(c) => OtherType::CorrespondingVariant(c.left(), c.right()),
|
||||
/// ThisType::UnexpectedVariant => panic!(),
|
||||
/// })
|
||||
/// ```
|
||||
#[macro_export]
|
||||
|
||||
Reference in New Issue
Block a user