swc_ecma_transforms::perf

Trait Items

pub trait Items:
    Sized
    + IntoIterator<Item = Self::Elem>
    + Send
    + Sealed {
    type Elem: Send + Sync;

    // Required methods
    fn len(&self) -> usize;
    fn split_at(self, idx: usize) -> (Self, Self);
}
Expand description

This is considered as a private type and it’s NOT A PUBLIC API.

Required Associated Types§

type Elem: Send + Sync

Required Methods§

fn len(&self) -> usize

fn split_at(self, idx: usize) -> (Self, Self)

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

§

impl<'a, T> Items for &'a [T]
where T: Send + Sync,

§

type Elem = &'a T

§

fn len(&self) -> usize

§

fn split_at(self, at: usize) -> (&'a [T], &'a [T])

§

impl<'a, T> Items for &'a mut [T]
where T: Send + Sync,

§

type Elem = &'a mut T

§

fn len(&self) -> usize

§

fn split_at(self, at: usize) -> (&'a mut [T], &'a mut [T])

§

impl<T> Items for Vec<T>
where T: Send + Sync,

§

type Elem = T

§

fn len(&self) -> usize

§

fn split_at(self, at: usize) -> (Vec<T>, Vec<T>)

Implementors§