pub(crate) enum Units<'a> {
Ascii(&'a str),
Wide(Vec<u16>),
}Expand description
文字列を UTF-16 の単位で見る(JS の添字・length の単位。2026-11-02)。ASCII はバイトがそのまま単位に
なるので配列を作らない。文字列は UTF-8 で持つので、サロゲートの片割れは表せず U+FFFD になる。
Variants§
Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Units<'a>
impl<'a> RefUnwindSafe for Units<'a>
impl<'a> Send for Units<'a>
impl<'a> Sync for Units<'a>
impl<'a> Unpin for Units<'a>
impl<'a> UnsafeUnpin for Units<'a>
impl<'a> UnwindSafe for Units<'a>
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