Skip to main content

## ArenaAllocatable

# Trait ArenaAllocatable

Source

    pub trait ArenaAllocatable<'tcx, C = IsNotCopy>: Sized {
        // Required methods
        fn allocate_on(self, arena: &'tcx Arena<'tcx>) -> &'tcx mut Self;
        fn allocate_from_iter(
            arena: &'tcx Arena<'tcx>,
            iter: impl IntoIterator<Item = Self>,
        ) -> &'tcx mut [Self];
    }

## Required Methods§

Source

#### fn allocate_on(self, arena: &'tcx Arena<'tcx>) -> &'tcx mut Self

Source

#### fn allocate_from_iter( arena: &'tcx Arena<'tcx>, iter: impl IntoIterator<Item = Self>, ) -> &'tcx mut [Self]

## Dyn Compatibility§

This trait is not dyn compatible.

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

## Implementations on Foreign Types§

Source§

### impl<'tcx> ArenaAllocatable<'tcx> for InlineAsmTemplatePiece

Source§

#### fn allocate_on(self, arena: &'tcx Arena<'tcx>) -> &'tcx mut Self

Source§

#### fn allocate_from_iter( arena: &'tcx Arena<'tcx>, iter: impl IntoIterator<Item = Self>, ) -> &'tcx mut [Self]

Source§

### impl<'tcx> ArenaAllocatable<'tcx> for MacroDef

Source§

#### fn allocate_on(self, arena: &'tcx Arena<'tcx>) -> &'tcx mut Self

Source§

#### fn allocate_from_iter( arena: &'tcx Arena<'tcx>, iter: impl IntoIterator<Item = Self>, ) -> &'tcx mut [Self]

## Implementors§

Source§

### impl<'tcx, T: Copy> ArenaAllocatable<'tcx, IsCopy> for T

Source§

### impl<'tcx> ArenaAllocatable<'tcx> for Attribute

Source§

### impl<'tcx> ArenaAllocatable<'tcx> for OwnerInfo<'tcx>