#[doc = crate::_tags!(text data_structure)]
#[doc = crate::_doc_meta!{location("text/layout")}]
#[must_use]
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct Textel<T>(pub T);
#[rustfmt::skip]
impl<T> Textel<T> {
pub const fn new(value: T) -> Self { Self(value) }
#[must_use]
pub const fn value(&self) -> &T { &self.0 }
#[must_use]
pub const fn value_mut(&mut self) -> &mut T { &mut self.0 }
#[must_use]
pub fn into_value(self) -> T { self.0 }
pub fn map<U>(self, f: impl FnOnce(T) -> U) -> Textel<U> { Textel(f(self.0)) }
}
impl<T> From<T> for Textel<T> {
fn from(value: T) -> Self {
Self(value)
}
}