sre_engine::engine

Trait StrDrive

Source
pub trait StrDrive: Copy {
    // Required methods
    fn offset(&self, offset: usize, skip: usize) -> usize;
    fn count(&self) -> usize;
    fn peek(&self, offset: usize) -> u32;
    fn back_peek(&self, offset: usize) -> u32;
    fn back_offset(&self, offset: usize, skip: usize) -> usize;
}

Required Methods§

Source

fn offset(&self, offset: usize, skip: usize) -> usize

Source

fn count(&self) -> usize

Source

fn peek(&self, offset: usize) -> u32

Source

fn back_peek(&self, offset: usize) -> u32

Source

fn back_offset(&self, offset: usize, skip: usize) -> usize

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.

Implementations on Foreign Types§

Source§

impl StrDrive for &str

Source§

fn offset(&self, offset: usize, skip: usize) -> usize

Source§

fn count(&self) -> usize

Source§

fn peek(&self, offset: usize) -> u32

Source§

fn back_peek(&self, offset: usize) -> u32

Source§

fn back_offset(&self, offset: usize, skip: usize) -> usize

Source§

impl<'a> StrDrive for &'a [u8]

Source§

fn offset(&self, offset: usize, skip: usize) -> usize

Source§

fn count(&self) -> usize

Source§

fn peek(&self, offset: usize) -> u32

Source§

fn back_peek(&self, offset: usize) -> u32

Source§

fn back_offset(&self, offset: usize, skip: usize) -> usize

Implementors§