pub struct PortGeneric<T, A> { /* private fields */ }
Expand description
An I/O port.
The port reads or writes values of type T
and has read/write access specified by A
.
Use the provided marker types or aliases to get a port type with the access you need:
PortGeneric<T, ReadWriteAccess>
->Port<T>
PortGeneric<T, ReadOnlyAccess>
->PortReadOnly<T>
PortGeneric<T, WriteOnlyAccess>
->PortWriteOnly<T>
Implementations§
Source§impl<T, A> PortGeneric<T, A>
impl<T, A> PortGeneric<T, A>
Sourcepub const fn new(port: u16) -> PortGeneric<T, A>
pub const fn new(port: u16) -> PortGeneric<T, A>
Creates an I/O port with the given port number.
Source§impl<T: PortRead, A: PortReadAccess> PortGeneric<T, A>
impl<T: PortRead, A: PortReadAccess> PortGeneric<T, A>
Source§impl<T: PortWrite, A: PortWriteAccess> PortGeneric<T, A>
impl<T: PortWrite, A: PortWriteAccess> PortGeneric<T, A>
Trait Implementations§
Source§impl<T, A> Clone for PortGeneric<T, A>
impl<T, A> Clone for PortGeneric<T, A>
Source§impl<T, A: PortAccess> Debug for PortGeneric<T, A>
impl<T, A: PortAccess> Debug for PortGeneric<T, A>
Source§impl<T, A> PartialEq for PortGeneric<T, A>
impl<T, A> PartialEq for PortGeneric<T, A>
impl<T, A> Eq for PortGeneric<T, A>
Auto Trait Implementations§
impl<T, A> Freeze for PortGeneric<T, A>
impl<T, A> RefUnwindSafe for PortGeneric<T, A>where
T: RefUnwindSafe,
A: RefUnwindSafe,
impl<T, A> Send for PortGeneric<T, A>
impl<T, A> Sync for PortGeneric<T, A>
impl<T, A> Unpin for PortGeneric<T, A>
impl<T, A> UnwindSafe for PortGeneric<T, A>where
T: UnwindSafe,
A: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more