pub trait WriteHandle: IoHandle {
// Required method
unsafe fn write_raw(&self, value: Self::Base);
}Expand description
Represents an abstracted means of register writes.
Required Methods§
Sourceunsafe fn write_raw(&self, value: Self::Base)
unsafe fn write_raw(&self, value: Self::Base)
Performs the write of the provided value.
§Safety
The caller must guarantee…
-
that the value-agnostic, implementation-specific preconditions for a sound write are met;
-
and further that the particular value will not cause undefined behaviour when written (in an implementation-specific way).
For example, in the case of a pointer to an MMIO address, the conditions would be that the pointer instance is valid and aligned, and that the particular value to write does not misconfigure hardware in a way that leads to undefined behavior (such as configuring DMA to overwrite arbitrary memory).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".