[][src]Trait logos::source::Slice

pub trait Slice<'source>: Sized + PartialEq + Eq + Debug {
    fn as_bytes(&self) -> &'source [u8];
}

Trait for a Slice of a Source that the Lexer can consume.

Most commonly, those will be the same types:

  • &str slice for &str source.
  • &[u8] slice for &[u8] source.

Required methods

fn as_bytes(&self) -> &'source [u8]

In all implementations we should at least be able to obtain a slice of bytes as the lowest level common denominator.

Loading content...

Implementations on Foreign Types

impl<'source> Slice<'source> for &'source str[src]

impl<'source> Slice<'source> for &'source [u8][src]

Loading content...

Implementors

Loading content...