Macro nom_locate::impl_offset [] [src]

macro_rules! impl_offset {
    ( $fragment_type:ty ) => { ... };
}

Implement nom::Offset for a specific fragment type.

Parameters

  • $fragment_type - The LocatedSpan's fragment type

Example of use

NB: This example is an extract from the nom_locate source code.

#[macro_use]
extern crate nom_locate;

impl_offset! {&'a str}
impl_offset! {&'a [u8]}