dyon
dyon copied to clipboard
Rust object shorthand syntax in macros
Dyon supports a shorthand syntax for Rust objects in the dyon_fn
macro:
dyon_fn{fn foo(a: #Foo) {
...
}}
-
#Foo
- by value (requires theCopy
trait) -
#&Foo
- by reference -
#&mut Foo
by mutable reference
One can also use #Foo
as return type:
dyon_fn{fn new_foo() -> #Foo { ... }}