[][src]Trait logos::source::WithSource

pub trait WithSource<Source> { }

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

In particular, if your token definitions would allow reading invalid UTF-8, the Logos derive macro will restrict you to lexing on Sources that also implement the BinarySource marker (&[u8] is provided).

Note: You shouldn't implement this trait yourself, #[derive(Logos)] will do it for you.

Implementors

Loading content...