Trait SliceWord

Source
pub trait SliceWord: 'static {
    // Required method
    fn slice_word(s: &str) -> Option<usize>;
}
Expand description

Defines an interface for slicing words out of input and literal text.

Required Methods§

Source

fn slice_word(s: &str) -> Option<usize>

If s starts with a word, how long is it?

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§