Case macro for the different kinds of vl-maybe-design structures.
This is an fty sum-type case macro,
typically introduced by defflexsum or deftagsum. It
allows you to safely check the type of a vl-maybe-design structure, or to split
into cases based on its type.
In its short form, vl-maybe-design-case allows you to safely check the type of
a vl-maybe-design structure. For example:
(vl-maybe-design-case x :none)
can be used to determine whether x is a none instead of some other kind of vl-maybe-design structure.
In its longer form, vl-maybe-design-case allows you to split into cases based
on the kind of structure you are looking at. A typical example would be:
It is also possible to consolidate ``uninteresting'' cases using
For convenience, the case macro automatically binds the fields of x for
you, as appropriate for each case. That is, in the :none case,
you can use defprod-style foo.bar style accessors for x
without having to explicitly add a none b*