Trait StrAssertions

Source
pub trait StrAssertions<T> {
    // Required methods
    fn starts_with<E: AsRef<str>>(&mut self, expected: E);
    fn ends_with<E: AsRef<str>>(&mut self, expected: E);
    fn contains<E: AsRef<str>>(&mut self, expected: E);
    fn does_not_contain<E: AsRef<str>>(&mut self, expected: E);
    fn is_empty(&mut self);
}

Required Methods§

Source

fn starts_with<E: AsRef<str>>(&mut self, expected: E)

Source

fn ends_with<E: AsRef<str>>(&mut self, expected: E)

Source

fn contains<E: AsRef<str>>(&mut self, expected: E)

Source

fn does_not_contain<E: AsRef<str>>(&mut self, expected: E)

Source

fn is_empty(&mut self)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T> StrAssertions<T> for Spec<'_, T>
where T: AsRef<str>,