Skip to main content

PatternRef

Trait PatternRef 

Source
pub trait PatternRef: Sealed {
    // Required methods
    fn trim_start_matches<'a>(&mut self, s: &'a str) -> &'a str;
    fn trim_end_matches<'a>(&mut self, s: &'a str) -> &'a str;
}
Expand description

A pattern that, unlike std::str::pattern::Pattern, does not consume the pattern when used.

Required Methods§

Source

fn trim_start_matches<'a>(&mut self, s: &'a str) -> &'a str

Source

fn trim_end_matches<'a>(&mut self, s: &'a str) -> &'a str

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl PatternRef for &&str

Source§

fn trim_start_matches<'a>(&mut self, s: &'a str) -> &'a str

Source§

fn trim_end_matches<'a>(&mut self, s: &'a str) -> &'a str

Source§

impl PatternRef for &[char]

Source§

fn trim_start_matches<'a>(&mut self, s: &'a str) -> &'a str

Source§

fn trim_end_matches<'a>(&mut self, s: &'a str) -> &'a str

Source§

impl PatternRef for &str

Source§

fn trim_start_matches<'a>(&mut self, s: &'a str) -> &'a str

Source§

fn trim_end_matches<'a>(&mut self, s: &'a str) -> &'a str

Source§

impl PatternRef for char

Source§

fn trim_start_matches<'a>(&mut self, s: &'a str) -> &'a str

Source§

fn trim_end_matches<'a>(&mut self, s: &'a str) -> &'a str

Source§

impl<const N: usize> PatternRef for &[char; N]

Source§

fn trim_start_matches<'a>(&mut self, s: &'a str) -> &'a str

Source§

fn trim_end_matches<'a>(&mut self, s: &'a str) -> &'a str

Source§

impl<const N: usize> PatternRef for [char; N]

Source§

fn trim_start_matches<'a>(&mut self, s: &'a str) -> &'a str

Source§

fn trim_end_matches<'a>(&mut self, s: &'a str) -> &'a str

Implementors§

Source§

impl<F: FnMut(char) -> bool> PatternRef for F