pub trait Source {
type Char;
type String;
type Error;
// Required methods
fn next_index(&self) -> usize;
fn is_empty(&self) -> bool;
fn advance_while(
&mut self,
predicate: impl FnMut(Self::Char) -> bool,
) -> Result<Self::String, Self::Error>;
}
Required Associated Types§
Required Methods§
Sourcefn next_index(&self) -> usize
fn next_index(&self) -> usize
Returns the start index of the next character.
fn is_empty(&self) -> bool
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.