What is the "<-" operator?

Hey folks!

I was watching the video about async in Rust from Jon Gjengset and here he's using a "<-" operator in the select macro. What is this and what does it do? :slight_smile: I really can't find any information about it.

Regards
keks

When you create a macro you can more or less use whatever syntax you want. There's no such thing as an <- operator outside of macros, and inside macros it just means whatever the macro author wants it to.

(As an aside, I don't think the real select! macro uses the <- syntax. But it could have done so.)

9 Likes

Ahhh, I see!! :slight_smile: Thanks a lot for your help! :slight_smile:

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.