[][src]Module logos::source

This module contains a bunch of traits necessary for processing byte strings.

Most notable are:

  • Source - implemented by default for &str and &[u8], used by the Lexer.
  • Slice - slices of Source, returned by Lexer::slice.

Traits

BinarySource

Marker trait for any Source that can be sliced into arbitrary byte chunks, with no regard for UTF-8 (or any other) character encoding.

Chunk

A fixed, statically sized chunk of data that can be read from the Source.

Slice

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

Source

Trait for types the Lexer can read from.

WithSource

Marker trait for any Logos, which will constrain it to a specific subset of Sources.