Struct RegExpMatchArray
#[repr(transparent)]
pub struct RegExpMatchArray { /* private fields */ }
The result array from RegExp.exec() or String.matchAll().
This is an array of strings with additional properties index, input, and groups.
Implementations
impl RegExpMatchArray
fn input(&self) -> JsStringThe original string that was matched against.
impl RegExpMatchArray
fn get(&self, index: u32) -> Option<JsString>Gets the matched string or capture group at the given index. Index 0 is the full match, indices 1+ are capture groups.
impl RegExpMatchArray
fn groups(&self) -> Option<Object>An object of named capturing groups whose keys are the names and valuestype Array are the capturing groups, or
undefinedif no named capturing groups were defined.
impl RegExpMatchArray
fn index(&self) -> u32The 0-based index of the match in the string.
impl RegExpMatchArray
fn length(&self) -> u32The number of elements in the match array (full match + capture groups).
Trait Implementations
impl AsRef<Array> for RegExpMatchArray
fn as_ref(&self) -> &Array
impl AsRef<JsValue> for RegExpMatchArray
fn as_ref(&self) -> &JsValue
impl AsRef<Object> for RegExpMatchArray
fn as_ref(&self) -> &Object
impl AsRef<RegExpMatchArray> for RegExpMatchArray
fn as_ref(&self) -> &RegExpMatchArray
impl Clone for RegExpMatchArray
fn clone(&self) -> Self
impl Debug for RegExpMatchArray
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Deref for RegExpMatchArray
type Target = Object;fn deref(&self) -> &Object
impl Eq for RegExpMatchArray
impl ErasableGeneric for RegExpMatchArray
type Repr = JsValue;
impl From<JsValue> for RegExpMatchArray
fn from(obj: JsValue) -> Self
impl FromWasmAbi for RegExpMatchArray
type Abi = <JsValue as FromWasmAbi>::Abi;unsafe fn from_abi(js: Self::Abi) -> Self
impl IntoJsGeneric for RegExpMatchArray
where
RegExpMatchArray: JsGeneric,
type JsCanon = RegExpMatchArray;fn to_js(self) -> RegExpMatchArray
impl IntoWasmAbi for RegExpMatchArray
type Abi = <JsValue as IntoWasmAbi>::Abi;fn into_abi(self) -> Self::Abi
impl JsCast for RegExpMatchArray
fn instanceof(val: &JsValue) -> boolfn unchecked_from_js(val: JsValue) -> Selffn unchecked_from_js_ref(val: &JsValue) -> &Self
impl LongRefFromWasmAbi for RegExpMatchArray
type Abi = <JsValue as LongRefFromWasmAbi>::Abi;type Anchor = RegExpMatchArray;unsafe fn long_ref_from_abi(js: Self::Abi) -> Self::Anchor
impl OptionFromWasmAbi for RegExpMatchArray
fn is_none(abi: &Self::Abi) -> bool
impl OptionIntoWasmAbi for RegExpMatchArray
fn none() -> Self::Abi
impl PartialEq for RegExpMatchArray
fn eq(&self, other: &Self) -> bool
impl Promising for RegExpMatchArray
type Resolution = RegExpMatchArray;
impl RefFromWasmAbi for RegExpMatchArray
type Abi = <JsValue as RefFromWasmAbi>::Abi;type Anchor = ManuallyDrop<RegExpMatchArray>;unsafe fn ref_from_abi(js: Self::Abi) -> Self::Anchor
impl StructuralPartialEq for RegExpMatchArray
impl UpcastFrom<RegExpMatchArray> for RegExpMatchArray
impl WasmDescribe for RegExpMatchArray
fn describe()