pub struct Session<'hir> { /* private fields */ }Expand description
Hir session
This struct represents a hir compilation session
It holds an arena with all the nodes of the tree, and
a map to find nodes by their HirId
Implementations§
Source§impl<'hir> Session<'hir>
impl<'hir> Session<'hir>
Source§impl<'hir> Session<'hir>
impl<'hir> Session<'hir>
pub fn alloc_annon<T, C>(&self, val: T) -> &'hir Twhere
T: ArenaAllocable<'hir, C>,
pub fn alloc<T, C>(&self, val: T) -> &'hir Twhere
T: ArenaAllocable<'hir, C> + HirNode<'hir>,
pub fn alloc_iter<T, I, C>(&self, val: I) -> &'hir [T]where
T: ArenaAllocable<'hir, C> + HirNode<'hir>,
I: IntoIterator<Item = T, IntoIter: ExactSizeIterator>,
pub fn alloc_iter_annon<T, I, C>(&self, val: I) -> &'hir [T]where
T: ArenaAllocable<'hir, C>,
I: IntoIterator<Item = T, IntoIter: ExactSizeIterator>,
Trait Implementations§
Auto Trait Implementations§
impl<'hir> !Freeze for Session<'hir>
impl<'hir> !RefUnwindSafe for Session<'hir>
impl<'hir> !Send for Session<'hir>
impl<'hir> !Sync for Session<'hir>
impl<'hir> Unpin for Session<'hir>
impl<'hir> !UnwindSafe for Session<'hir>
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