Skip to main content

JsStringSliceIndex

Trait JsStringSliceIndex 

Source
pub trait JsStringSliceIndex {
    // Required method
    fn get(self, str: &JsString) -> Option<JsString>;
}
Expand description

Similar to std::ops::RangeBounds but custom implemented for getting direct indices.

Required Methods§

Source

fn get(self, str: &JsString) -> Option<JsString>

Get the substring (or None if outside the string).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl JsStringSliceIndex for Range<usize>

Source§

fn get(self, str: &JsString) -> Option<JsString>

Source§

impl JsStringSliceIndex for RangeFrom<usize>

Source§

fn get(self, str: &JsString) -> Option<JsString>

Source§

impl JsStringSliceIndex for RangeFull

Source§

fn get(self, str: &JsString) -> Option<JsString>

Source§

impl JsStringSliceIndex for RangeInclusive<usize>

Source§

fn get(self, str: &JsString) -> Option<JsString>

Source§

impl JsStringSliceIndex for RangeTo<usize>

Source§

fn get(self, str: &JsString) -> Option<JsString>

Source§

impl JsStringSliceIndex for RangeToInclusive<usize>

Source§

fn get(self, str: &JsString) -> Option<JsString>

Implementors§