::core::

Primitive inout

Implementations

impl<T> inout<T>
pub fn read_write(self) -> (Option<T>, inv Option<T>)

Returns a pair of output/input ports to interact with an inout value.

This function provides exclusive I/O access to the inout port, so only one of those operations can be performed at any given moment. When the value at the input is set to Some(_), the port is driven and the output is None. When the value at the input is set to None, the port is left in a high-impedance state and the output is the incoming value Some(_).

impl<T, #uint N> inout<[T; N]>
pub fn read_write_items(self) -> [(Option<T>, inv Option<T>); N]

Returns a pair of output/input ports to interact with the items of an inout array.

This function provides exclusive I/O access each of the inout port items, so only one of those operations can be performed at any given moment on any given item. For every item, when the value at its input is set to Some(_), the port is driven and its output is None. When the value at its input is set to None, the port is left in a high-impedance state and its output is the incoming value Some(_).