Well, _if_ you need that feature, you can wrap the trait into another trait that allows a write to the pin, but discards it.
However, by default, nonsensical operations should not be possible.
However, by default, nonsensical operations should not be possible.
I haven't seen that in ARM microcontrollers, but as peripherals vary across manufacturers I don't think you can assume that it's not done this way.