use super::{IntoNamespacePath, IntoRawNamespacePath, RawNamespacePathWrapper};
#[derive(Debug, Default, PartialEq, Eq, PartialOrd, Ord, Clone, Copy, Hash)]
pub struct IntoIntoRawNSPath<T>(pub T);
impl<T> From<T> for IntoIntoRawNSPath<T> {
#[inline]
fn from(value: T) -> Self {
Self(value)
}
}
impl<T: IntoNamespacePath> IntoNamespacePath for IntoIntoRawNSPath<T> {
type NSPath = T::NSPath;
#[inline]
fn into_namespace_path(self) -> Self::NSPath {
self.0.into_namespace_path()
}
#[inline]
fn into_into_raw(self) -> impl IntoRawNamespacePath
where
Self: Sized,
{
self
}
}
impl<T: IntoNamespacePath> IntoRawNamespacePath for IntoIntoRawNSPath<T> {
type RawNSPath = RawNamespacePathWrapper<T::NSPath>;
#[inline]
fn into_raw_namespace_path(self) -> Self::RawNSPath {
self.0.into_namespace_path().into()
}
}