use crate::prelude::*;
impl<'a> QuerySegment<'a> {
pub fn name(&self) -> QueryName<'_> {
match self {
Self::Special (x) => x.name().into(),
Self::NonSpecial(x) => x.name().into(),
}
}
pub fn into_name(self) -> QueryName<'a> {
match self {
Self::Special (x) => x.into_name().into(),
Self::NonSpecial(x) => x.into_name().into(),
}
}
pub fn set_name<'b, T: Into<SpecialQueryName<'b>> + Into<NonSpecialQueryName<'b>>>(&mut self, name: T) {
match self {
Self::Special (x) => x.set_name(name),
Self::NonSpecial(x) => x.set_name(name),
}
}
}