OpIO

Trait OpIO 

Source
pub trait OpIO {
Show 14 methods // Required methods fn num_inputs(&self) -> usize; fn input(&self, i: usize) -> ValueId; fn input_mut(&mut self, i: usize) -> &mut ValueId; fn num_outputs(&self) -> usize; fn output(&self, i: usize) -> ValueId; fn output_mut(&mut self, i: usize) -> &mut ValueId; // Provided methods fn inputs(&self) -> impl Iterator<Item = ValueId> + '_ { ... } fn map_inputs(&mut self, f: impl FnMut(ValueId) -> ValueId) { ... } fn outputs(&self) -> impl Iterator<Item = ValueId> + '_ { ... } fn map_outputs(&mut self, f: impl FnMut(ValueId) -> ValueId) { ... } fn values(&self) -> impl Iterator<Item = ValueId> + '_ { ... } fn map_values(&mut self, f: impl FnMut(ValueId) -> ValueId) { ... } fn attr_eq(&self, _rhs: &Self) -> bool { ... } fn attr_hash<H: Hasher>(&self, _state: &mut H) { ... }
}

Required Methods§

Source

fn num_inputs(&self) -> usize

Source

fn input(&self, i: usize) -> ValueId

Source

fn input_mut(&mut self, i: usize) -> &mut ValueId

Source

fn num_outputs(&self) -> usize

Source

fn output(&self, i: usize) -> ValueId

Source

fn output_mut(&mut self, i: usize) -> &mut ValueId

Provided Methods§

Source

fn inputs(&self) -> impl Iterator<Item = ValueId> + '_

Source

fn map_inputs(&mut self, f: impl FnMut(ValueId) -> ValueId)

Source

fn outputs(&self) -> impl Iterator<Item = ValueId> + '_

Source

fn map_outputs(&mut self, f: impl FnMut(ValueId) -> ValueId)

Source

fn values(&self) -> impl Iterator<Item = ValueId> + '_

Source

fn map_values(&mut self, f: impl FnMut(ValueId) -> ValueId)

Source

fn attr_eq(&self, _rhs: &Self) -> bool

Source

fn attr_hash<H: Hasher>(&self, _state: &mut H)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T: OpIO> OpIO for Option<T>

Source§

fn num_inputs(&self) -> usize

Source§

fn input(&self, i: usize) -> ValueId

Source§

fn input_mut(&mut self, i: usize) -> &mut ValueId

Source§

fn num_outputs(&self) -> usize

Source§

fn output(&self, i: usize) -> ValueId

Source§

fn output_mut(&mut self, i: usize) -> &mut ValueId

Source§

fn attr_eq(&self, rhs: &Self) -> bool

Source§

fn attr_hash<H: Hasher>(&self, state: &mut H)

Source§

impl<T: OpIO> OpIO for Box<T>

Source§

fn num_inputs(&self) -> usize

Source§

fn input(&self, i: usize) -> ValueId

Source§

fn input_mut(&mut self, i: usize) -> &mut ValueId

Source§

fn num_outputs(&self) -> usize

Source§

fn output(&self, i: usize) -> ValueId

Source§

fn output_mut(&mut self, i: usize) -> &mut ValueId

Source§

fn attr_eq(&self, rhs: &Self) -> bool

Source§

fn attr_hash<H: Hasher>(&self, state: &mut H)

Source§

impl<T: OpIO> OpIO for Vec<T>

Source§

fn num_inputs(&self) -> usize

Source§

fn input(&self, i: usize) -> ValueId

Source§

fn input_mut(&mut self, i: usize) -> &mut ValueId

Source§

fn num_outputs(&self) -> usize

Source§

fn output(&self, i: usize) -> ValueId

Source§

fn output_mut(&mut self, i: usize) -> &mut ValueId

Source§

fn attr_eq(&self, rhs: &Self) -> bool

Source§

fn attr_hash<H: Hasher>(&self, state: &mut H)

Implementors§