pub trait StringRead: StrRead {
    // Required methods
    fn pop_string(&mut self) -> Option<String>;
    fn peek_mut_string(&mut self) -> Option<&mut String>;

    // Provided method
    fn map_string(&mut self, f: impl FnMut(&mut String)) { ... }
}
Expand description

Represent anything that pops out String.

Required Methods§

source

fn pop_string(&mut self) -> Option<String>

Remove the next String and return it.

source

fn peek_mut_string(&mut self) -> Option<&mut String>

Get a mutable reference to the next String.

Provided Methods§

source

fn map_string(&mut self, f: impl FnMut(&mut String))

Change the next String that will be poped.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl StringRead for String

source§

fn pop_string(&mut self) -> Option<String>

source§

fn map_string(&mut self, f: impl FnMut(&mut String))

source§

fn peek_mut_string(&mut self) -> Option<&mut String>

Implementors§