pub trait PosnInCharStream: UserPosn {
// Required method
fn byte_ofs(&self) -> usize;
// Provided method
fn move_by_char(self, ch: char) -> Self { ... }
}Expand description
Trait for location within a character stream
This tracks a byte offset within the stream so that strings can be retrieved from the stream. Byte offsets must always be on UTF8 boundaries.
Required Methods§
Provided Methods§
Sourcefn move_by_char(self, ch: char) -> Self
fn move_by_char(self, ch: char) -> Self
Move on by a character
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.