Trait nom::ExtendInto

source ·
pub trait ExtendInto {
    type Item;
    type Extender: Extend<Self::Item>;

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

abtracts 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: Extend<Self::Item>

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

Object Safety§

This trait is not object safe.

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§