I've started to study the rotor library and I've found the expression:
me @ Echo::Server(..) => me.accept(),
What does this mean and how do I use the @
operator? My guess is that it is something like a cast operation, but the Rust book's section about casting doesn't mention it.
You can use the syntax index in the Rust Book to look up bits of syntax. In this case, it's a pattern binding, used to bind a specific part of a pattern to a variable.
Here, it's being used to bind the entire value to
me
if and only if it is anEcho::Server
variant.