I’m getting back into learning Elixir after a couple weeks off and for the life of me I can’t remember (or maybe never came across) what the double colon :: operator is used for.
I’m reading The Little Elixir and OTP Guidebook and there is an example in Chapter 2 using it (without an explanation or introduction to the operator). Here is the snippet of code from the example:
<< “TAG”, title :: binary-size(30),
artist :: binary-size(30),
album :: binary-size(30),
year :: binary-size(4),
_rest :: binary >> = id3_tag
Can someone explain the use of the :: operator?
Thanks!






















