pub struct Arena<'tcx> {
pub dropless: DroplessArena,
asm_template: TypedArena<InlineAsmTemplatePiece>,
attribute: TypedArena<Attribute>,
owner_info: TypedArena<OwnerInfo<'tcx>>,
macro_def: TypedArena<MacroDef>,
delegation_info: TypedArena<DelegationInfo>,
}Fields§
§dropless: DroplessArena§asm_template: TypedArena<InlineAsmTemplatePiece>§attribute: TypedArena<Attribute>§owner_info: TypedArena<OwnerInfo<'tcx>>§macro_def: TypedArena<MacroDef>§delegation_info: TypedArena<DelegationInfo>Implementations§
Source§impl<'tcx> Arena<'tcx>
impl<'tcx> Arena<'tcx>
pub fn alloc<T: ArenaAllocatable<'tcx, C>, C>(&'tcx self, value: T) -> &mut T
pub fn alloc_slice<T: Copy>(&self, value: &[T]) -> &mut [T]
pub fn alloc_str(&self, string: &str) -> &str
pub fn alloc_os_str(&self, os_str: &OsStr) -> &OsStr
pub fn alloc_path(&self, path: &Path) -> &Path
pub fn alloc_from_iter<T: ArenaAllocatable<'tcx, C>, C>( &'tcx self, iter: impl IntoIterator<Item = T>, ) -> &mut [T]
pub fn alloc_index_slice_from_iter<I, T, C>(
&'tcx self,
iter: impl IntoIterator<Item = T>,
) -> &mut IndexSlice<I, T>where
I: Idx,
T: ArenaAllocatable<'tcx, C>,
Trait Implementations§
Auto Trait Implementations§
impl<'tcx> !DynSync for Arena<'tcx>
impl<'tcx> !Freeze for Arena<'tcx>
impl<'tcx> !RefUnwindSafe for Arena<'tcx>
impl<'tcx> !Send for Arena<'tcx>
impl<'tcx> !Sync for Arena<'tcx>
impl<'tcx> !UnwindSafe for Arena<'tcx>
impl<'tcx> DynSend for Arena<'tcx>where
DroplessArena: DynSend,
TypedArena<InlineAsmTemplatePiece>: DynSend,
TypedArena<Attribute>: DynSend,
TypedArena<OwnerInfo<'tcx>>: DynSend,
TypedArena<MacroDef>: DynSend,
TypedArena<DelegationInfo>: DynSend,
impl<'tcx> Forget for Arena<'tcx>
impl<'tcx> Move for Arena<'tcx>
impl<'tcx> Unpin for Arena<'tcx>where
*mut u8: Unpin,
*const u8 is !null: Unpin,
*const [MaybeUninit<u8>] is !null: Unpin,
*mut InlineAsmTemplatePiece: Unpin,
*const [MaybeUninit<InlineAsmTemplatePiece>] is !null: Unpin,
&'static str: Unpin,
String: Unpin,
*mut Attribute: Unpin,
*const [MaybeUninit<Attribute>] is !null: Unpin,
*const Header is !null: Unpin,
Box<CfgEntry>: Unpin,
Box<DocAttribute>: Unpin,
Box<EiiImpl>: Unpin,
Box<Directive>: Unpin,
Box<RustcAutodiff>: Unpin,
NonZero<u32>: Unpin,
Box<GenericArgs>: Unpin,
Box<AttrItem>: Unpin,
*mut OwnerInfo<'tcx>: Unpin,
*const [MaybeUninit<OwnerInfo<'tcx>>] is !null: Unpin,
&'tcx Param<'tcx>: Unpin,
&'tcx Item<'tcx>: Unpin,
&'tcx UseTree<'tcx>: Unpin,
&'tcx ForeignItem<'tcx>: Unpin,
&'tcx TraitItem<'tcx>: Unpin,
&'tcx ImplItem<'tcx>: Unpin,
&'tcx Variant<'tcx>: Unpin,
&'tcx FieldDef<'tcx>: Unpin,
&'tcx AnonConst: Unpin,
&'tcx ConstBlock: Unpin,
&'tcx ConstArg<'tcx>: Unpin,
&'tcx Expr<'tcx>: Unpin,
&'tcx ExprField<'tcx>: Unpin,
&'tcx ConstArgExprField<'tcx>: Unpin,
&'tcx Stmt<'tcx>: Unpin,
&'tcx PathSegment<'tcx>: Unpin,
&'tcx Ty<'tcx>: Unpin,
&'tcx AssocItemConstraint<'tcx>: Unpin,
&'tcx TraitRef<'tcx>: Unpin,
&'tcx OpaqueTy<'tcx>: Unpin,
&'tcx TyPat<'tcx>: Unpin,
&'tcx Pat<'tcx>: Unpin,
&'tcx PatField<'tcx>: Unpin,
&'tcx PatExpr<'tcx>: Unpin,
&'tcx Arm<'tcx>: Unpin,
&'tcx Block<'tcx>: Unpin,
&'tcx LetStmt<'tcx>: Unpin,
&'tcx VariantData<'tcx>: Unpin,
&'tcx Lifetime: Unpin,
&'tcx GenericParam<'tcx>: Unpin,
&'tcx Mod<'tcx>: Unpin,
&'tcx InferArg: Unpin,
&'tcx WherePredicate<'tcx>: Unpin,
&'tcx PreciseCapturingNonLifetimeArg: Unpin,
&'tcx TestBinderBoundTypeConstraint<'tcx>: Unpin,
&'tcx Body<'tcx>: Unpin,
&'tcx [Attribute]: Unpin,
&'tcx [(Span, LocalDefId)]: Unpin,
&'tcx [TraitCandidate<'tcx>]: Unpin,
&'tcx OwnerInfo<'tcx>: Unpin,
Align8<usize>: Unpin,
Box<[DelayedLint]>: Unpin,
*mut MacroDef: Unpin,
*const [MaybeUninit<MacroDef>] is !null: Unpin,
Box<DelimArgs>: Unpin,
*mut DelegationInfo: Unpin,
*const [MaybeUninit<DelegationInfo>] is !null: Unpin,
impl<'tcx> UnsafeUnpin for Arena<'tcx>where
*mut u8: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<ArenaChunk>: UnsafeUnpin,
*mut InlineAsmTemplatePiece: UnsafeUnpin,
PhantomData<ArenaChunk<InlineAsmTemplatePiece>>: UnsafeUnpin,
PhantomData<InlineAsmTemplatePiece>: UnsafeUnpin,
*mut Attribute: UnsafeUnpin,
PhantomData<ArenaChunk<Attribute>>: UnsafeUnpin,
PhantomData<Attribute>: UnsafeUnpin,
*mut OwnerInfo<'tcx>: UnsafeUnpin,
PhantomData<ArenaChunk<OwnerInfo<'tcx>>>: UnsafeUnpin,
PhantomData<OwnerInfo<'tcx>>: UnsafeUnpin,
*mut MacroDef: UnsafeUnpin,
PhantomData<ArenaChunk<MacroDef>>: UnsafeUnpin,
PhantomData<MacroDef>: UnsafeUnpin,
*mut DelegationInfo: UnsafeUnpin,
PhantomData<ArenaChunk<DelegationInfo>>: UnsafeUnpin,
PhantomData<DelegationInfo>: UnsafeUnpin,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
Source§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 288 bytes