concision_data/traits/
records.rs

1/*
2    Appellation: records <module>
3    Contrib: @FL03
4*/
5
6/// This trait generically defines the basic type of dataset that can be used throughout the
7/// framework.
8pub trait Records {
9    type Inputs;
10    type Targets;
11
12    fn inputs(&self) -> &Self::Inputs;
13
14    fn inputs_mut(&mut self) -> &mut Self::Inputs;
15
16    fn targets(&self) -> &Self::Targets;
17
18    fn targets_mut(&mut self) -> &mut Self::Targets;
19
20    fn set_inputs(&mut self, inputs: Self::Inputs) {
21        *self.inputs_mut() = inputs;
22    }
23
24    fn set_targets(&mut self, targets: Self::Targets) {
25        *self.targets_mut() = targets;
26    }
27}