Trait Slice

Source
pub trait Slice<'s>:
    AsRef<str>
    + Clone
    + PartialEq {
    // Required methods
    fn slice(&self, range: Range<usize>) -> Self;
    fn trim(&mut self);
}

Required Methods§

Source

fn slice(&self, range: Range<usize>) -> Self

Source

fn trim(&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.

Implementations on Foreign Types§

Source§

impl<'s> Slice<'s> for &'s str

Source§

fn slice(&self, range: Range<usize>) -> Self

Source§

fn trim(&mut self)

Source§

impl<'s> Slice<'s> for String

Source§

fn slice(&self, range: Range<usize>) -> Self

Source§

fn trim(&mut self)

Implementors§