Trait HasIO

Source
pub trait HasIO {
    // Required methods
    fn inputs(&self) -> InputIterator<'_, Self>
       where Self: Sized;
    fn outputs(&self) -> OutputIterator<'_, Self>
       where Self: Sized;

    // Provided method
    fn dst<'a>(&'a self) -> Option<usize>
       where Self: 'a + Sized,
             OutputIterator<'a, Self>: Iterator<Item = usize> { ... }
}
Expand description

Applies to all gates, allows access to the input and output wire IDs of the gates

Required Methods§

Source

fn inputs(&self) -> InputIterator<'_, Self>
where Self: Sized,

Source

fn outputs(&self) -> OutputIterator<'_, Self>
where Self: Sized,

Provided Methods§

Source

fn dst<'a>(&'a self) -> Option<usize>
where Self: 'a + Sized, OutputIterator<'a, Self>: Iterator<Item = usize>,

For convenience, allows access to the (optional) output, since each gate only ever has one at most.

Implementors§