#[non_exhaustive]pub enum Split {
None,
Whitespace,
Character,
UnicodeWhitespace,
}Expand description
分割の方式。既定の Whitespace の空白判定は ASCII に限る。
Unicode White_Space(全角空白・NBSP 等)での分割は UnicodeWhitespace を
opt-in で選ぶ。#[non_exhaustive] のため variant の追加は非破壊。
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
None
分割しない(入力全体を 1 トークン)。空入力 "" も 1 トークン(id 0)になる。
Whitespace
ASCII 空白(SP・TAB・LF・FF・CR)だけで分割する(既定)。連続空白で空 トークンは出ない。Unicode White_Space(全角空白・NBSP 等)では分割しない。
Character
char(Unicode スカラー値)単位で分割する。書記素クラスタ単位ではなく、
結合文字や ZWJ 絵文字は複数トークンに分かれる。
UnicodeWhitespace
Unicode White_Space(char::is_whitespace)で分割する。全角空白・NBSP・VT・
NEL・U+2028 で区切る。ZWSP(U+200B)は White_Space ではないので区切らない。
連続空白で空トークンは出ない。
Trait Implementations§
impl Copy for Split
impl Eq for Split
impl StructuralPartialEq for Split
Auto Trait Implementations§
impl Freeze for Split
impl RefUnwindSafe for Split
impl Send for Split
impl Sync for Split
impl Unpin for Split
impl UnsafeUnpin for Split
impl UnwindSafe for Split
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more