[][src]Macro nom5_locate::impl_extend_into

macro_rules! impl_extend_into {
    ($fragment_type:ty, $item:ty, $extender:ty) => { ... };
}

Implement nom::ExtendInto for a specific fragment type.

Parameters

  • $fragment_type - The LocatedSpan's fragment type
  • $item - The type of the item being iterated (a reference for fragments of type &[T]).
  • $extender - The type of the Extended.

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_extend_into!(&'a str, char, String);
impl_extend_into!(CompleteStr<'a>, char, String);
impl_extend_into!(&'a [u8], u8, Vec<u8>);
impl_extend_into!(CompleteByteSlice<'a>, u8, Vec<u8>);