Trait nom::ExtendInto

source ·
pub trait ExtendInto {
    type Item;
    type Extender;

    // Required methods
    fn new_builder(&self) -> Self::Extender;
    fn extend_into(&self, acc: &mut Self::Extender);
}
Expand description

Abstracts something which can extend an Extend. Used to build modified input slices in escaped_transform

Required Associated Types§

source

type Item

The current input type is a sequence of that Item type.

Example: u8 for &[u8] or char for &str

source

type Extender

The type that will be produced

Required Methods§

source

fn new_builder(&self) -> Self::Extender

Create a new Extend of the correct type

source

fn extend_into(&self, acc: &mut Self::Extender)

Accumulate the input into an accumulator

Implementations on Foreign Types§

source§

impl ExtendInto for &str

§

type Item = char

§

type Extender = String

source§

fn new_builder(&self) -> String

source§

fn extend_into(&self, acc: &mut String)

source§

impl ExtendInto for &[u8]

§

type Item = u8

§

type Extender = Vec<u8>

source§

fn new_builder(&self) -> Vec<u8>

source§

fn extend_into(&self, acc: &mut Vec<u8>)

source§

impl ExtendInto for char

§

type Item = char

§

type Extender = String

source§

fn new_builder(&self) -> String

source§

fn extend_into(&self, acc: &mut String)

source§

impl ExtendInto for str

§

type Item = char

§

type Extender = String

source§

fn new_builder(&self) -> String

source§

fn extend_into(&self, acc: &mut String)

source§

impl ExtendInto for [u8]

§

type Item = u8

§

type Extender = Vec<u8>

source§

fn new_builder(&self) -> Vec<u8>

source§

fn extend_into(&self, acc: &mut Vec<u8>)

Implementors§