Soundness of BufferViewMut #2582
-
Although attempting to get a If we try to perform a read, what is going to happen, is the behavior defined? And even if it is defined soundly, if it crashes the program (e.g. it generates an access violation), I'd still consider it a hazardous interface because we can't guarantee that the compiler won't emit a |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
It's perfectly defined, it's just going to be potentially slow as hell due to the kind of caching behavior inherent with write-optimized mappings. The whole "getting a read only view panics" is just an attempt to discourage reading from it, as ultimately rust has no concept of a "write only" type. |
Beta Was this translation helpful? Give feedback.
It's perfectly defined, it's just going to be potentially slow as hell due to the kind of caching behavior inherent with write-optimized mappings. The whole "getting a read only view panics" is just an attempt to discourage reading from it, as ultimately rust has no concept of a "write only" type.