#[derive(Clone)] pub struct Feature { feature_vector: Vec, source_file: String, id: Option, } impl Feature { pub fn new(feature_vector: Vec, source_file: String, id: Option) -> Self { Self { feature_vector, source_file, id, } } pub fn feature_vector(&self) -> &[f32] { &self.feature_vector } pub fn source_file(&self) -> &str { &self.source_file } pub fn id(&self) -> &Option { &self.id } pub fn set_id(&mut self, id: i64) { self.id = Some(id); } }