pub trait PositionalInputs: NumInputs {
type InputId: IdType;
// Required method
fn get_input_var(&self, position: usize) -> Option<Self::InputId>;
// Provided method
fn find_input_position(&self, input_id: &Self::InputId) -> Option<usize> { ... }
}Expand description
Define positions of input variables such that they can be adressed with an index.
Required Associated Types§
Required Methods§
Sourcefn get_input_var(&self, position: usize) -> Option<Self::InputId>
fn get_input_var(&self, position: usize) -> Option<Self::InputId>
Find the input variable at the given position.
Returns None if there’s no variable at the position.
Provided Methods§
Sourcefn find_input_position(&self, input_id: &Self::InputId) -> Option<usize>
fn find_input_position(&self, input_id: &Self::InputId) -> Option<usize>
Find the first position of an input variable.