use std::borrow::Cow;
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct MaskedValue<'a>(
Cow<'a, str>,
);
impl<'a> MaskedValue<'a> {
#[must_use]
#[inline(always)]
pub(crate) const fn new(value: Cow<'a, str>) -> Self {
Self(value)
}
#[cfg(feature = "http")]
#[must_use]
#[inline(always)]
pub(crate) fn as_str(&self) -> &str {
self.0.as_ref()
}
#[cfg(feature = "http")]
#[must_use]
#[inline(always)]
pub(crate) fn into_owned(self) -> String {
self.0.into_owned()
}
#[cfg(feature = "http")]
#[must_use]
#[inline(always)]
pub(crate) fn into_inner(self) -> Cow<'a, str> {
self.0
}
}