Skip to main content

ExPortRead

Trait ExPortRead 

Source
pub trait ExPortRead {
    type ExternalTraitSpecificationFor: PortRead;

    // Required method
    unsafe fn read_from_port(port: u16) -> Self
       where Self: Sized;
}
Expand description

Trusted specification boundary for values that can be read from an x86 I/O port.

Required Associated Types§

Required Methods§

Source

unsafe exec fn read_from_port(port: u16) -> Self
where Self: Sized,

requires
valid_io_port_access::<Self>(port),

A port read can produce any value supplied by the device.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§