Struct Segments

#[repr(transparent)]
pub struct Segments { /* private fields */ }

The Segments object is an iterable collection of segments of a string.

MDN documentation

Implementations

impl Segments

fn containing(&self, index: u32) -> Option<SegmentData>

Returns segment data for the segment containing the character at the given index.

MDN documentation

Trait Implementations

impl AsRef<JsValue> for Segments

fn as_ref(&self) -> &JsValue

impl AsRef<Object> for Segments

fn as_ref(&self) -> &Object

impl AsRef<Segments> for Segments

fn as_ref(&self) -> &Segments

impl Clone for Segments

fn clone(&self) -> Self

impl Debug for Segments

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Deref for Segments

type Target = Object;
fn deref(&self) -> &Object

impl ErasableGeneric for Segments

type Repr = JsValue;

impl From<JsValue> for Segments

fn from(obj: JsValue) -> Self

impl FromWasmAbi for Segments

type Abi = <JsValue as FromWasmAbi>::Abi;
unsafe fn from_abi(js: Self::Abi) -> Self

impl IntoJsGeneric for Segments where Segments: JsGeneric,

type JsCanon = Segments;
fn to_js(self) -> Segments

impl IntoWasmAbi for Segments

type Abi = <JsValue as IntoWasmAbi>::Abi;
fn into_abi(self) -> Self::Abi

impl JsCast for Segments

fn instanceof(val: &JsValue) -> bool
fn unchecked_from_js(val: JsValue) -> Self
fn unchecked_from_js_ref(val: &JsValue) -> &Self

impl LongRefFromWasmAbi for Segments

type Abi = <JsValue as LongRefFromWasmAbi>::Abi;
type Anchor = Segments;
unsafe fn long_ref_from_abi(js: Self::Abi) -> Self::Anchor

impl OptionFromWasmAbi for Segments

fn is_none(abi: &Self::Abi) -> bool

impl OptionIntoWasmAbi for Segments

fn none() -> Self::Abi

impl Promising for Segments

type Resolution = Segments;

impl RefFromWasmAbi for Segments

type Abi = <JsValue as RefFromWasmAbi>::Abi;
type Anchor = ManuallyDrop<Segments>;
unsafe fn ref_from_abi(js: Self::Abi) -> Self::Anchor

impl UpcastFrom<Segments> for Segments

impl WasmDescribe for Segments

fn describe()

Auto Trait Implementations

impl Freeze for Segments

impl RefUnwindSafe for Segments

impl Send for Segments

impl Sync for Segments

impl Unpin for Segments

impl UnsafeUnpin for Segments

impl UnwindSafe for Segments

Blanket Implementations

impl<P, T> Receiver for Segments where P: Deref<Target = T> + ?Sized, T: ?Sized,

impl<S, T> Upcast<T> for Segments where T: UpcastFrom<S> + ?Sized, S: ?Sized,

impl<T> Any for Segments where T: 'static + ?Sized,

impl<T> Borrow<T> for Segments where T: ?Sized,

impl<T> BorrowMut<T> for Segments where T: ?Sized,

impl<T> CloneToUninit for Segments where T: Clone,

impl<T> From<T> for Segments

impl<T> JsGeneric for Segments where T: ErasableGeneric<Repr = JsValue> + UpcastFrom<T> + Upcast<JsValue> + JsCast + 'static,

impl<T> ReturnWasmAbi for Segments where T: IntoWasmAbi,

impl<T> ToOwned for Segments where T: Clone,

impl<T> TryFromJsValue for Segments where T: JsCast,

impl<T> VectorFromWasmAbi for Segments where T: ErasableGeneric<Repr = JsValue> + WasmDescribe,

impl<T> VectorIntoWasmAbi for Segments where T: ErasableGeneric<Repr = JsValue> + WasmDescribe,

impl<T> VectorRefIntoWasmAbi for Segments where &'a T: for<'a> Into<JsValue>,

impl<T, U> Into<U> for Segments where U: From<T>,

impl<T, U> TryFrom<U> for Segments where U: Into<T>,

impl<T, U> TryInto<U> for Segments where U: TryFrom<T>,