Trait flatcontainer::ReserveItems

source ·
pub trait ReserveItems<R: Region> {
    // Required method
    fn reserve_items<I>(target: &mut R, items: I)
       where I: Iterator<Item = Self> + Clone;
}
Expand description

Reserve space in the receiving region.

Closely related to CopyOnto, but separate because target type is likely different.

Required Methods§

source

fn reserve_items<I>(target: &mut R, items: I)
where I: Iterator<Item = Self> + Clone,

Ensure that the region can absorb items without reallocation.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<'a, A, A_C: Region> ReserveItems<TupleARegion<A_C>> for &'a (A,)
where &'a A: ReserveItems<A_C>,

source§

fn reserve_items<It>(target: &mut TupleARegion<A_C>, items: It)
where It: Iterator<Item = Self> + Clone,

source§

impl<'a, A, A_C: Region, B, B_C: Region> ReserveItems<TupleABRegion<A_C, B_C>> for &'a (A, B)
where &'a A: ReserveItems<A_C>, &'a B: ReserveItems<B_C>,

source§

fn reserve_items<It>(target: &mut TupleABRegion<A_C, B_C>, items: It)
where It: Iterator<Item = Self> + Clone,

source§

impl<'a, A, A_C: Region, B, B_C: Region, C, C_C: Region> ReserveItems<TupleABCRegion<A_C, B_C, C_C>> for &'a (A, B, C)

source§

fn reserve_items<It>(target: &mut TupleABCRegion<A_C, B_C, C_C>, items: It)
where It: Iterator<Item = Self> + Clone,

source§

impl<'a, A, A_C: Region, B, B_C: Region, C, C_C: Region, D, D_C: Region> ReserveItems<TupleABCDRegion<A_C, B_C, C_C, D_C>> for &'a (A, B, C, D)

source§

fn reserve_items<It>( target: &mut TupleABCDRegion<A_C, B_C, C_C, D_C>, items: It )
where It: Iterator<Item = Self> + Clone,

source§

impl<'a, A, A_C: Region, B, B_C: Region, C, C_C: Region, D, D_C: Region, E, E_C: Region> ReserveItems<TupleABCDERegion<A_C, B_C, C_C, D_C, E_C>> for &'a (A, B, C, D, E)

source§

fn reserve_items<It>( target: &mut TupleABCDERegion<A_C, B_C, C_C, D_C, E_C>, items: It )
where It: Iterator<Item = Self> + Clone,

source§

impl<'a, A, A_C: Region, B, B_C: Region, C, C_C: Region, D, D_C: Region, E, E_C: Region, F, F_C: Region> ReserveItems<TupleABCDEFRegion<A_C, B_C, C_C, D_C, E_C, F_C>> for &'a (A, B, C, D, E, F)

source§

fn reserve_items<It>( target: &mut TupleABCDEFRegion<A_C, B_C, C_C, D_C, E_C, F_C>, items: It )
where It: Iterator<Item = Self> + Clone,

source§

impl<'a, A, A_C: Region, B, B_C: Region, C, C_C: Region, D, D_C: Region, E, E_C: Region, F, F_C: Region, G, G_C: Region> ReserveItems<TupleABCDEFGRegion<A_C, B_C, C_C, D_C, E_C, F_C, G_C>> for &'a (A, B, C, D, E, F, G)

source§

fn reserve_items<It>( target: &mut TupleABCDEFGRegion<A_C, B_C, C_C, D_C, E_C, F_C, G_C>, items: It )
where It: Iterator<Item = Self> + Clone,

source§

impl<'a, A, A_C: Region, B, B_C: Region, C, C_C: Region, D, D_C: Region, E, E_C: Region, F, F_C: Region, G, G_C: Region, H, H_C: Region> ReserveItems<TupleABCDEFGHRegion<A_C, B_C, C_C, D_C, E_C, F_C, G_C, H_C>> for &'a (A, B, C, D, E, F, G, H)

source§

fn reserve_items<It>( target: &mut TupleABCDEFGHRegion<A_C, B_C, C_C, D_C, E_C, F_C, G_C, H_C>, items: It )
where It: Iterator<Item = Self> + Clone,

source§

impl<'a, A, A_C: Region, B, B_C: Region, C, C_C: Region, D, D_C: Region, E, E_C: Region, F, F_C: Region, G, G_C: Region, H, H_C: Region, I, I_C: Region> ReserveItems<TupleABCDEFGHIRegion<A_C, B_C, C_C, D_C, E_C, F_C, G_C, H_C, I_C>> for &'a (A, B, C, D, E, F, G, H, I)

source§

fn reserve_items<It>( target: &mut TupleABCDEFGHIRegion<A_C, B_C, C_C, D_C, E_C, F_C, G_C, H_C, I_C>, items: It )
where It: Iterator<Item = Self> + Clone,

source§

impl<'a, A, A_C: Region, B, B_C: Region, C, C_C: Region, D, D_C: Region, E, E_C: Region, F, F_C: Region, G, G_C: Region, H, H_C: Region, I, I_C: Region, J, J_C: Region> ReserveItems<TupleABCDEFGHIJRegion<A_C, B_C, C_C, D_C, E_C, F_C, G_C, H_C, I_C, J_C>> for &'a (A, B, C, D, E, F, G, H, I, J)

source§

fn reserve_items<It>( target: &mut TupleABCDEFGHIJRegion<A_C, B_C, C_C, D_C, E_C, F_C, G_C, H_C, I_C, J_C>, items: It )
where It: Iterator<Item = Self> + Clone,

source§

impl<'a, A, A_C: Region, B, B_C: Region, C, C_C: Region, D, D_C: Region, E, E_C: Region, F, F_C: Region, G, G_C: Region, H, H_C: Region, I, I_C: Region, J, J_C: Region, K, K_C: Region> ReserveItems<TupleABCDEFGHIJKRegion<A_C, B_C, C_C, D_C, E_C, F_C, G_C, H_C, I_C, J_C, K_C>> for &'a (A, B, C, D, E, F, G, H, I, J, K)

source§

fn reserve_items<It>( target: &mut TupleABCDEFGHIJKRegion<A_C, B_C, C_C, D_C, E_C, F_C, G_C, H_C, I_C, J_C, K_C>, items: It )
where It: Iterator<Item = Self> + Clone,

source§

impl<'a, A, A_C: Region, B, B_C: Region, C, C_C: Region, D, D_C: Region, E, E_C: Region, F, F_C: Region, G, G_C: Region, H, H_C: Region, I, I_C: Region, J, J_C: Region, K, K_C: Region, L, L_C: Region> ReserveItems<TupleABCDEFGHIJKLRegion<A_C, B_C, C_C, D_C, E_C, F_C, G_C, H_C, I_C, J_C, K_C, L_C>> for &'a (A, B, C, D, E, F, G, H, I, J, K, L)

source§

fn reserve_items<It>( target: &mut TupleABCDEFGHIJKLRegion<A_C, B_C, C_C, D_C, E_C, F_C, G_C, H_C, I_C, J_C, K_C, L_C>, items: It )
where It: Iterator<Item = Self> + Clone,

source§

impl<'a, A, A_C: Region, B, B_C: Region, C, C_C: Region, D, D_C: Region, E, E_C: Region, F, F_C: Region, G, G_C: Region, H, H_C: Region, I, I_C: Region, J, J_C: Region, K, K_C: Region, L, L_C: Region, M, M_C: Region> ReserveItems<TupleABCDEFGHIJKLMRegion<A_C, B_C, C_C, D_C, E_C, F_C, G_C, H_C, I_C, J_C, K_C, L_C, M_C>> for &'a (A, B, C, D, E, F, G, H, I, J, K, L, M)

source§

fn reserve_items<It>( target: &mut TupleABCDEFGHIJKLMRegion<A_C, B_C, C_C, D_C, E_C, F_C, G_C, H_C, I_C, J_C, K_C, L_C, M_C>, items: It )
where It: Iterator<Item = Self> + Clone,

source§

impl<'a, A, A_C: Region, B, B_C: Region, C, C_C: Region, D, D_C: Region, E, E_C: Region, F, F_C: Region, G, G_C: Region, H, H_C: Region, I, I_C: Region, J, J_C: Region, K, K_C: Region, L, L_C: Region, M, M_C: Region, N, N_C: Region> ReserveItems<TupleABCDEFGHIJKLMNRegion<A_C, B_C, C_C, D_C, E_C, F_C, G_C, H_C, I_C, J_C, K_C, L_C, M_C, N_C>> for &'a (A, B, C, D, E, F, G, H, I, J, K, L, M, N)

source§

fn reserve_items<It>( target: &mut TupleABCDEFGHIJKLMNRegion<A_C, B_C, C_C, D_C, E_C, F_C, G_C, H_C, I_C, J_C, K_C, L_C, M_C, N_C>, items: It )
where It: Iterator<Item = Self> + Clone,

source§

impl<'a, A, A_C: Region, B, B_C: Region, C, C_C: Region, D, D_C: Region, E, E_C: Region, F, F_C: Region, G, G_C: Region, H, H_C: Region, I, I_C: Region, J, J_C: Region, K, K_C: Region, L, L_C: Region, M, M_C: Region, N, N_C: Region, O, O_C: Region> ReserveItems<TupleABCDEFGHIJKLMNORegion<A_C, B_C, C_C, D_C, E_C, F_C, G_C, H_C, I_C, J_C, K_C, L_C, M_C, N_C, O_C>> for &'a (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)

source§

fn reserve_items<It>( target: &mut TupleABCDEFGHIJKLMNORegion<A_C, B_C, C_C, D_C, E_C, F_C, G_C, H_C, I_C, J_C, K_C, L_C, M_C, N_C, O_C>, items: It )
where It: Iterator<Item = Self> + Clone,

source§

impl<'a, A, A_C: Region, B, B_C: Region, C, C_C: Region, D, D_C: Region, E, E_C: Region, F, F_C: Region, G, G_C: Region, H, H_C: Region, I, I_C: Region, J, J_C: Region, K, K_C: Region, L, L_C: Region, M, M_C: Region, N, N_C: Region, O, O_C: Region, P, P_C: Region> ReserveItems<TupleABCDEFGHIJKLMNOPRegion<A_C, B_C, C_C, D_C, E_C, F_C, G_C, H_C, I_C, J_C, K_C, L_C, M_C, N_C, O_C, P_C>> for &'a (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)

source§

fn reserve_items<It>( target: &mut TupleABCDEFGHIJKLMNOPRegion<A_C, B_C, C_C, D_C, E_C, F_C, G_C, H_C, I_C, J_C, K_C, L_C, M_C, N_C, O_C, P_C>, items: It )
where It: Iterator<Item = Self> + Clone,

source§

impl<'a, T, R: Region, O: OffsetContainer<R::Index>> ReserveItems<SliceRegion<R, O>> for &'a [T]
where &'a T: ReserveItems<R> + 'a,

source§

fn reserve_items<I>(target: &mut SliceRegion<R, O>, items: I)
where I: Iterator<Item = Self> + Clone,

source§

impl<'a, T: 'a, R: Region, O: OffsetContainer<R::Index>> ReserveItems<SliceRegion<R, O>> for &'a Vec<T>
where &'a T: ReserveItems<R>,

source§

fn reserve_items<I>(target: &mut SliceRegion<R, O>, items: I)
where I: Iterator<Item = Self> + Clone,

source§

impl<'a, T: 'a, R: Region, O: OffsetContainer<R::Index>, const N: usize> ReserveItems<SliceRegion<R, O>> for &'a [T; N]
where &'a T: ReserveItems<R>,

source§

fn reserve_items<I>(target: &mut SliceRegion<R, O>, items: I)
where I: Iterator<Item = Self> + Clone,

source§

impl<'a, T: 'a, TC, E: 'a, EC> ReserveItems<ResultRegion<TC, EC>> for &'a Result<T, E>
where TC: Region, EC: Region, &'a T: ReserveItems<TC>, &'a E: ReserveItems<EC>,

source§

fn reserve_items<I>(target: &mut ResultRegion<TC, EC>, items: I)
where I: Iterator<Item = Self> + Clone,

source§

impl<'a, T: 'a, TR> ReserveItems<OptionRegion<TR>> for &'a Option<T>
where TR: Region, &'a T: ReserveItems<TR>,

source§

fn reserve_items<I>(target: &mut OptionRegion<TR>, items: I)
where I: Iterator<Item = Self> + Clone,

source§

impl<'a, T: Index> ReserveItems<MirrorRegion<T>> for &'a T

source§

fn reserve_items<I>(_target: &mut MirrorRegion<T>, _items: I)
where I: Iterator<Item = Self> + Clone,

source§

impl<R> ReserveItems<StringRegion<R>> for &&str
where for<'a> R: Region<ReadItem<'a> = &'a [u8]> + 'a, for<'a> &'a [u8]: CopyOnto<R> + ReserveItems<R>,

source§

fn reserve_items<I>(target: &mut StringRegion<R>, items: I)
where I: Iterator<Item = Self> + Clone,

source§

impl<R> ReserveItems<StringRegion<R>> for &str
where for<'a> R: Region<ReadItem<'a> = &'a [u8]> + 'a, for<'a> &'a [u8]: CopyOnto<R> + ReserveItems<R>,

source§

fn reserve_items<I>(target: &mut StringRegion<R>, items: I)
where I: Iterator<Item = Self> + Clone,

source§

impl<R> ReserveItems<StringRegion<R>> for &String
where for<'a> R: Region<ReadItem<'a> = &'a [u8]> + 'a, for<'a> &'a [u8]: CopyOnto<R> + ReserveItems<R>,

source§

fn reserve_items<I>(target: &mut StringRegion<R>, items: I)
where I: Iterator<Item = Self> + Clone,

source§

impl<T: Copy> ReserveItems<CopyRegion<T>> for &[T]

source§

fn reserve_items<I>(target: &mut CopyRegion<T>, items: I)
where I: Iterator<Item = Self> + Clone,

source§

impl<T: Copy> ReserveItems<CopyRegion<T>> for &Vec<T>

source§

fn reserve_items<I>(target: &mut CopyRegion<T>, items: I)
where I: Iterator<Item = Self> + Clone,

Implementors§