Type Alias gluon_base::types::AppVec

source ·
pub type AppVec<T> = SmallVec<[T; 2]>;
Expand description

SmallVec used in the Type::App constructor to avoid allocating a Vec for every applied type. If Type is changed in a way that changes its size it is likely a good idea to change the number of elements in the SmallVec so that it fills out the entire Type enum while not increasing the size of Type.

Aliased Type§

struct AppVec<T> { /* private fields */ }

Trait Implementations§

source§

impl<'ast, Id, T> AstClone<'ast, Id> for AppVec<T>
where T: Clone,

source§

fn ast_clone(&self, _arena: ArenaRef<'_, 'ast, Id>) -> Self

source§

impl<T> TypeAlloc<T> for AppVec<T>
where T: TypePtr + TypePtr<Types = Self>,

§

type Elem = T

source§

fn alloc_extend( iter: impl IntoIterator<Item = Self::Elem>, context: &mut (impl ?Sized + TypeContext<T::Id, T>) ) -> Self