pub trait StrRead {
    // Required method
    fn peek_str<'a>(&'a self) -> Option<&'a str>;

    // Provided method
    fn is_empty(&self) -> bool { ... }
}
Expand description

The base trait that both RealStrRead and StringRead need to implement.

Required Methods§

source

fn peek_str<'a>(&'a self) -> Option<&'a str>

Get a reference to the next &str.

Returns None if it’s empty.

Provided Methods§

source

fn is_empty(&self) -> bool

Check if there is nothing to pop.

Implementations on Foreign Types§

source§

impl StrRead for str

source§

fn peek_str<'a>(&'a self) -> Option<&'a str>

source§

impl StrRead for String

source§

fn peek_str<'a>(&'a self) -> Option<&'a str>

source§

impl<R: StrRead + ?Sized> StrRead for Box<R>

source§

fn peek_str<'a>(&'a self) -> Option<&'a str>

Implementors§