@aeva In a short answer, not *directly* like you're asking.
In a longer answer, the masking system allows you to mask all things from an overlay, all things from a package *category* (which doesnt help since "is written in rust" isnt a category), or specific packages / versions of packages
What you *could* do is run `equery depends --all-packages -F '$cp' dev-lang/rust | sort -u` to generate a list of every package that depends on rust, and write it to a file in /etc/portage/package.mask/
I think you can then unmask one by one with /etc/portage/package.unmask/ without having to remove them from this auto-generated file (but I might be wrong about this).
equery comes from the "app-portage/gentoolkit" package
You would also need to make this run after syncing... They added a way to put a post-sync hook for a script to run after syncing I know, but I dont know how you do that I've never done it myself