The following assumes you’re taking the course. If you’re not, it’s still better to avoid making homework solutions available online to students.

I’d like to kindly remind that universities take academic honesty very seriously, and while your phrasing of the question was appropriate, it is best to state explicitly that you are asking something related to your homework, and also show the context via linking to whatever public materials.

When you ask questions regarding your homework, it is very important that you ask very carefully to make sure everything is in the clear. And letting others know this is related to a homework will help others to craft their responses more carefully, in a more useful way, and also avoid getting anyone in trouble due to academic dishonesty.

Providing context also helps you to get better replies, many people may choose to ignore your question immediately since you’re asking a very bespoke piece of code with possibly no common usage associated to the pattern.

I’d like to add that professors and tutors are very well aware of most(if not all) of the avenues where students may be able to ask homework questions, you’d be wrong if you think you would not get caught should you commit such acts. Incidents of that nature have occurred on the OCaml forum before.

It is your duty to uphold your academic honesty as you’re participating in the academia, and honesty in your career in general, and it is important that you make everything as explicit as you can when you are treading potentially sensitive issues.

Lastly, a somewhat similar question is present on the linked webpage already as follows

“What do the readable!, writeable!, and readable_writeable! macros do?”

Admittedly this is different from what you’re asking, and admittedly I have no idea if the questions are marked in your course, but people generally ask the more general case instead of a particular one, or craft a separate example, just to stay very clear.

=====

Now to answer your question.

This syntax is experimental, if you compile it on the Rust playground, or a blank project, you will be linked to this issue.

Thus you may not find many useful information on it yet. Still, AFAIK it shares most components with existing macro construction mechanisms, namely macro_rules!, so the corresponding chapters in the Rust book should help you: