ReadableStrExt

Trait ReadableStrExt 

Source
pub trait ReadableStrExt: Readable
where Self::Target: Deref<Target = str> + 'static,
{ // Provided methods fn is_empty(&self) -> bool { ... } fn len(&self) -> usize { ... } fn contains(&self, pat: &str) -> bool { ... } }
Available on crate feature prelude only.
Expand description

An extension trait for Readable<String> and Readable<str> that provides some convenience methods.

Provided Methods§

Source

fn is_empty(&self) -> bool

Check if the string is empty.

Source

fn len(&self) -> usize

Get the length of the string.

Source

fn contains(&self, pat: &str) -> bool

Check if the string contains the given pattern.

Implementors§

Source§

impl<W> ReadableStrExt for W
where W: Readable, <W as Readable>::Target: Deref<Target = str> + 'static,