Skip to main content

Range

Trait Range 

Source
pub trait Range {
    // Required method
    fn sub_nearest<'a>(&self, obj: &'a str) -> &'a str;
}
Available on crate feature string only.
Expand description

The range trait that represents all supported range types for sub_nearest method.

Required Methods§

Source

fn sub_nearest<'a>(&self, obj: &'a str) -> &'a str

The actual implementation of nearest substring, see sub_nearest for more information.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl Range for Range<usize>

Source§

fn sub_nearest<'a>(&self, obj: &'a str) -> &'a str

Source§

impl Range for RangeFrom<usize>

Source§

fn sub_nearest<'a>(&self, obj: &'a str) -> &'a str

Source§

impl Range for RangeTo<usize>

Source§

fn sub_nearest<'a>(&self, obj: &'a str) -> &'a str

Implementors§