1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
use crate::nodes::Prefix; #[derive(Clone, Debug, PartialEq, Eq)] pub struct FieldExpression { prefix: Prefix, field: String, } impl FieldExpression { pub fn new<S: Into<String>>(prefix: Prefix, field: S) -> Self { Self { prefix, field: field.into(), } } #[inline] pub fn get_prefix(&self) -> &Prefix { &self.prefix } #[inline] pub fn get_field(&self) -> &String { &self.field } pub fn mutate_prefix(&mut self) -> &mut Prefix { &mut self.prefix } }