Skip to main content

WriteHandle

Trait WriteHandle 

Source
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§

Source

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".

Implementors§

Source§

impl WriteHandle for CrIo<0>

Source§

impl WriteHandle for CrIo<2>

Source§

impl WriteHandle for CrIo<3>

Source§

impl WriteHandle for CrIo<4>

Source§

impl WriteHandle for CrIo<8>

Source§

impl<Access: Writable> WriteHandle for PortIo<u8, Access>

Source§

impl<Access: Writable> WriteHandle for PortIo<u16, Access>

Source§

impl<Access: Writable> WriteHandle for PortIo<u32, Access>

Source§

impl<Access: Writable> WriteHandle for PortIo<u64, Access>

Source§

impl<Access> WriteHandle for MmioPtr<u8, Access>
where Access: Writable,

Source§

impl<Access> WriteHandle for MmioPtr<u16, Access>
where Access: Writable,

Source§

impl<Access> WriteHandle for MmioPtr<u32, Access>
where Access: Writable,

Source§

impl<Access> WriteHandle for MmioPtr<u64, Access>
where Access: Writable,

Source§

impl<const ID: u32> WriteHandle for MsrIo<ID>