Skip to main content

PortIo

Struct PortIo 

Source
pub struct PortIo<Base, Access: Accessible> { /* private fields */ }
Expand description

An I/O backend for reading from and writing to x86 I/O ports.

Implementations§

Source§

impl<Base, Access: Accessible> PortIo<Base, Access>

Source

pub const fn new(port: u16) -> Self

Constructs a new port I/O handle.

Source

pub const fn port(&self) -> u16

Returns the port address.

Trait Implementations§

Source§

impl<Base, Access: Accessible> Clone for PortIo<Base, Access>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable)§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<Base, Access: Accessible> Copy for PortIo<Base, Access>

Source§

impl<Base: Debug, Access: Debug + Accessible> Debug for PortIo<Base, Access>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<Base: Copy, Access: Accessible> IoHandle for PortIo<Base, Access>

Source§

type Base = Base

The underlying base type of the register (assumed integral in practice).
Source§

impl<Access: Readable> ReadHandle for PortIo<u8, Access>

Source§

unsafe fn read_raw(&self) -> u8

Performs the read. Read more
Source§

impl<Access: Readable> ReadHandle for PortIo<u16, Access>

Source§

unsafe fn read_raw(&self) -> u16

Performs the read. Read more
Source§

impl<Access: Readable> ReadHandle for PortIo<u32, Access>

Source§

unsafe fn read_raw(&self) -> u32

Performs the read. Read more
Source§

impl<Access: Readable> ReadHandle for PortIo<u64, Access>

Source§

unsafe fn read_raw(&self) -> u64

Performs the read. Read more
Source§

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

Source§

unsafe fn write_raw(&self, value: u8)

Performs the write of the provided value. Read more
Source§

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

Source§

unsafe fn write_raw(&self, value: u16)

Performs the write of the provided value. Read more
Source§

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

Source§

unsafe fn write_raw(&self, value: u32)

Performs the write of the provided value. Read more
Source§

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

Source§

unsafe fn write_raw(&self, value: u64)

Performs the write of the provided value. Read more

Auto Trait Implementations§

§

impl<Base, Access> Freeze for PortIo<Base, Access>

§

impl<Base, Access> RefUnwindSafe for PortIo<Base, Access>
where Base: RefUnwindSafe, Access: RefUnwindSafe,

§

impl<Base, Access> Send for PortIo<Base, Access>
where Base: Send, Access: Send,

§

impl<Base, Access> Sync for PortIo<Base, Access>
where Base: Sync, Access: Sync,

§

impl<Base, Access> Unpin for PortIo<Base, Access>
where Base: Unpin, Access: Unpin,

§

impl<Base, Access> UnsafeUnpin for PortIo<Base, Access>

§

impl<Base, Access> UnwindSafe for PortIo<Base, Access>
where Base: UnwindSafe, Access: UnwindSafe,

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CloneToUninit for T
where T: Clone,

§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

Source§

impl<Layout, Base> LayoutOver<Base> for Layout
where Layout: Copy + From<Base> + Into<Base>,

§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = !

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.