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§
Sourcefn pop_string(&mut self) -> Option<String>
fn pop_string(&mut self) -> Option<String>
Remove the next String
and return it.
Sourcefn peek_mut_string(&mut self) -> Option<&mut String>
fn peek_mut_string(&mut self) -> Option<&mut String>
Get a mutable reference to the next String
.
Provided Methods§
Sourcefn map_string(&mut self, f: impl FnMut(&mut String))
fn map_string(&mut self, f: impl FnMut(&mut String))
Change the next String
that will be poped.
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.