#![allow(non_camel_case_types)]
pub(crate) use crate::{NonExtremeU8, NonExtremeU32, NonNiche, NonValueU16};
pub(crate) type NonSurrogateU16 = NonValueU16<0xDFFF>;
#[doc = crate::_tags!(construction text)]
#[doc = crate::_doc_location!("text/char")]
#[macro_export]
#[cfg_attr(cargo_primary_package, doc(hidden))]
macro_rules! ch {
( // charu
u $char:literal) => { $crate::charu::from_char($char) };
(u str $str:literal) => { $crate::charu::from_str_unchecked($str) };
(u bytes $str:literal) => { $crate::unwrap![some $crate::charu::from_utf8_bytes($str)] };
( // charu_niche
un $char:literal) => { $crate::charu_niche::from_char($char) };
(un str $str:literal) => { $crate::charu_niche::from_str_unchecked($str) };
(un bytes $str:literal) => { $crate::unwrap![some $crate::charu_niche::from_utf8_bytes($str)] };
(
c7 $char:literal) => { $crate::unwrap![some $crate::char7::try_from_char($char)] };
(c8 $char:literal) => { $crate::unwrap![some $crate::char8::try_from_char($char)] };
(c16 $char:literal) => { $crate::unwrap![some $crate::char16::try_from_char($char)] };
}
pub use ch;
#[doc = crate::_tags!(text)]
#[doc = crate::_doc_location!("text/char")]
#[must_use]
#[repr(transparent)]
#[derive(Clone, Copy, Hash, PartialEq, Eq, PartialOrd, Ord)]
pub struct char7(pub(super) NonExtremeU8);
#[doc = crate::_tags!(text)]
#[doc = crate::_doc_location!("text/char")]
#[must_use]
#[repr(transparent)]
#[derive(Clone, Copy, Hash, PartialEq, Eq, PartialOrd, Ord)]
pub struct char8(pub(crate) u8);
#[doc = crate::_tags!(text)]
#[doc = crate::_doc_location!("text/char")]
#[must_use]
#[repr(transparent)]
#[derive(Clone, Copy, Hash, PartialEq, Eq, PartialOrd, Ord)]
pub struct char16(pub(super) NonSurrogateU16);
#[doc = crate::_tags!(text)]
#[doc = crate::_doc_location!("text/char")]
#[must_use]
#[repr(transparent)]
#[derive(Clone, Copy, Hash, PartialEq, Eq, PartialOrd, Ord)]
pub struct charu(pub(super) NonNiche<u32>);
#[doc = crate::_tags!(text)]
#[doc = crate::_doc_location!("text/char")]
#[must_use]
#[repr(transparent)]
#[derive(Clone, Copy, Hash, PartialEq, Eq, PartialOrd, Ord)]
pub struct charu_niche(pub(super) NonExtremeU32);
#[cfg(test)]
const _TEST_CHAR_SIZES: () = {
assert![size_of::<char7>() == 1];
assert![size_of::<Option<char7>>() == 1];
assert![size_of::<char8>() == 1];
assert![size_of::<Option<char8>>() == 2];
assert![size_of::<char16>() == 2];
assert![size_of::<Option<char16>>() == 2];
assert![size_of::<charu>() == 4];
assert![size_of::<Option<charu>>() == 8];
assert![size_of::<charu_niche>() == 4];
assert![size_of::<Option<charu_niche>>() == 4];
assert![size_of::<char>() == 4];
assert![size_of::<Option<char>>() == 4];
};