pub struct AstArena { /* private fields */ }Implementations§
Source§impl AstArena
impl AstArena
pub fn new() -> Self
pub fn alloc<T>(&self, value: T) -> &mut T
pub fn alloc_node<T>(&self, value: T) -> &T
pub fn alloc_attribute<'ast>( &'ast self, value: Attribute<'ast>, ) -> &'ast Attribute<'ast>
pub fn alloc_function<'ast>( &'ast self, value: Function<'ast>, ) -> &'ast Function<'ast>
pub fn alloc_generic_type<'ast>( &'ast self, value: GenericType<'ast>, ) -> &'ast GenericType<'ast>
pub fn alloc_generic_type_pack<'ast>( &'ast self, value: GenericTypePack<'ast>, ) -> &'ast GenericTypePack<'ast>
pub fn alloc_local<'ast>(&'ast self, value: Local<'ast>) -> &'ast Local<'ast>
pub fn alloc_local_binding<'ast>( &'ast self, init: LocalInit<'ast>, ) -> &'ast Local<'ast>
pub fn alloc_type<'ast>( &'ast self, location: Location, value: TypeKind<'ast>, ) -> Type<'ast>
pub fn alloc_type_pack<'ast>( &'ast self, location: Location, value: TypePackKind<'ast>, ) -> TypePack<'ast>
pub fn alloc_slice_fill_iter<T, I>(&self, values: I) -> &[T]
pub fn alloc_slice_copy<T: Copy>(&self, values: &[T]) -> &[T]
pub fn alloc_bytes(&self, bytes: &[u8]) -> &[u8] ⓘ
pub fn alloc_ast_string<'ast>(&'ast self, bytes: &[u8]) -> AstString<'ast>
Source§impl AstArena
impl AstArena
pub fn alloc_type_kind<'ast>( &'ast self, location: Location, kind: TypeKind<'ast>, ) -> Type<'ast>
pub fn alloc_type_pack_kind<'ast>( &'ast self, location: Location, kind: TypePackKind<'ast>, ) -> TypePack<'ast>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for AstArena
impl !RefUnwindSafe for AstArena
impl !Sync for AstArena
impl !UnwindSafe for AstArena
impl Send for AstArena
impl Unpin for AstArena
impl UnsafeUnpin for AstArena
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