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

Creates an I/O port with the given port number.

Reads from the port.

Safety

This function is unsafe because the I/O port could have side effects that violate memory safety.

Writes to the port.

Safety

This function is unsafe because the I/O port could have side effects that violate memory safety.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.