Macro nom_locate::impl_slice_ranges [−][src]
macro_rules! impl_slice_ranges { ( $fragment_type:ty ) => { ... }; }
Implement nom::Slice for a specific fragment type and for these types of range:
Range<usize>
RangeTo<usize>
RangeFrom<usize>
RangeFull
Parameters
$fragment_type
- The LocatedSpan'sfragment
type
Example of use
NB: This example is an extract from the nom_locate source code.
ⓘThis example is not tested
#[macro_use] extern crate nom_locate; impl_slice_ranges! {&'a str} impl_slice_ranges! {&'a [u8]}