pub struct Language(SmallVec<[u8; 8]>);Expand description
A language tag used to select shaping rules.
Tuple Fields§
§0: SmallVec<[u8; 8]>Implementations§
Source§impl Language
impl Language
Sourcepub fn new(bytes: impl AsRef<[u8]>) -> Option<Self>
pub fn new(bytes: impl AsRef<[u8]>) -> Option<Self>
Creates a language from nonempty bytes.
ASCII letters are lowercased and underscores become hyphens. Returns
None for empty input.
Sourcepub fn as_str(&self) -> &str
pub fn as_str(&self) -> &str
Returns the language as UTF-8, or an empty string for invalid UTF-8.
fn from_bytes(bytes: &[u8]) -> Self
Trait Implementations§
impl Eq for Language
Source§impl ParseSetting for Language
impl ParseSetting for Language
impl StructuralPartialEq for Language
Auto Trait Implementations§
impl Freeze for Language
impl RefUnwindSafe for Language
impl Send for Language
impl Sync for Language
impl Unpin for Language
impl UnsafeUnpin for Language
impl UnwindSafe for Language
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more