<div dir="ltr"><div>Is there a way to restrict the type of a parameter to value types only (struct)? I know of Any and AnyObject, but I'm missing AnyValue. </div><div><br></div><div>How can I achieve something like the following, to make sure that the parameter is immutable and has copy-on-write feature?</div><div><br></div><div>protocol Actor: class {</div><div> func send(message: AnyValue)</div><div>}</div><div><br></div><div>I'm curious why AnyValue is missing. Can someone answer this?</div><div><br></div><div>Thanks in advance.</div></div>
<br>
<div><font color="#808080" size="1">Board of Directors: Andrew Pinnington, Alistair McCann, Jonas Gumny</font></div><div><font color="#808080" size="1">Commercial Register: HRB 110377</font></div><div><font color="#808080" size="1"><br></font></div><div><font color="#808080" size="1">The information and attached file(s) (if any) contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Any access to this email by persons other than the addressee is prohibited. If you are not the addressee for whom this email is intended, you may not disclose, copy, distribute or store this email. If you receive this in error, please delete and email confirmation to the sender. Thank you for your cooperation.</font></div>