Skip to main content

ExtendInto

Trait 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

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl ExtendInto for &[u8]

Available on crate feature alloc only.
Source§

type Item = u8

Source§

type Extender = Vec<u8>

Source§

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

Source§

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

Source§

impl ExtendInto for &str

Available on crate feature alloc only.
Source§

impl ExtendInto for [u8]

Available on crate feature alloc only.
Source§

type Item = u8

Source§

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

Available on crate feature alloc only.
Source§

impl ExtendInto for str

Available on crate feature alloc only.

Implementors§