Chomp

Trait Chomp 

Source
pub trait Chomp<'a> {
    // Required method
    fn chomp(_: Self) -> &'a str;
}
Expand description

Trait for specifying how to remove the trailing newline characters (\r, \n).

Required Methods§

Source

fn chomp(_: Self) -> &'a str

Return a string slice that does not contain the trailing newline characters.

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<'a> Chomp<'a> for &'a str

Source§

fn chomp(string: Self) -> &'a str

Source§

impl<'a> Chomp<'a> for &'a String

Source§

fn chomp(string: Self) -> &'a str

Implementors§