Struct SegmentData
#[repr(transparent)]
pub struct SegmentData { /* private fields */ }
Data about a segment returned by the Segments iterator.
Implementations
impl SegmentData
fn input(&self) -> JsStringThe original input string.
impl SegmentData
fn segment(&self) -> JsStringThe segment string.
impl SegmentData
fn is_word_like(&self) -> Option<bool>Whether the segment is word-like (only for word granularity).
impl SegmentData
fn index(&self) -> u32The index of the segment in the original string.
Trait Implementations
impl AsRef<JsValue> for SegmentData
fn as_ref(&self) -> &JsValue
impl AsRef<Object> for SegmentData
fn as_ref(&self) -> &Object
impl AsRef<SegmentData> for SegmentData
fn as_ref(&self) -> &SegmentData
impl Clone for SegmentData
fn clone(&self) -> Self
impl Debug for SegmentData
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Deref for SegmentData
type Target = Object;fn deref(&self) -> &Object
impl ErasableGeneric for SegmentData
type Repr = JsValue;
impl From<JsValue> for SegmentData
fn from(obj: JsValue) -> Self
impl FromWasmAbi for SegmentData
type Abi = <JsValue as FromWasmAbi>::Abi;unsafe fn from_abi(js: Self::Abi) -> Self
impl IntoJsGeneric for SegmentData
where
SegmentData: JsGeneric,
type JsCanon = SegmentData;fn to_js(self) -> SegmentData
impl IntoWasmAbi for SegmentData
type Abi = <JsValue as IntoWasmAbi>::Abi;fn into_abi(self) -> Self::Abi
impl JsCast for SegmentData
fn instanceof(val: &JsValue) -> boolfn unchecked_from_js(val: JsValue) -> Selffn unchecked_from_js_ref(val: &JsValue) -> &Self
impl LongRefFromWasmAbi for SegmentData
type Abi = <JsValue as LongRefFromWasmAbi>::Abi;type Anchor = SegmentData;unsafe fn long_ref_from_abi(js: Self::Abi) -> Self::Anchor
impl OptionFromWasmAbi for SegmentData
fn is_none(abi: &Self::Abi) -> bool
impl OptionIntoWasmAbi for SegmentData
fn none() -> Self::Abi
impl Promising for SegmentData
type Resolution = SegmentData;
impl RefFromWasmAbi for SegmentData
type Abi = <JsValue as RefFromWasmAbi>::Abi;type Anchor = ManuallyDrop<SegmentData>;unsafe fn ref_from_abi(js: Self::Abi) -> Self::Anchor
impl UpcastFrom<SegmentData> for SegmentData
impl WasmDescribe for SegmentData
fn describe()