Macro nom_locate::impl_slice_ranges [−][src]
macro_rules! impl_slice_ranges { ($fragment_type : ty) => { ... }; }
Expand description
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’sfragmenttype
Example of use
NB: This example is an extract from the nom_locate source code.
ⓘ
#[macro_use] extern crate nom_locate; impl_slice_ranges! {&'a str} impl_slice_ranges! {&'a [u8]}