pub struct BlockRoot<'blk> {
pub base: BlockBase<'blk>,
pub file_name: Option<String>,
pub crate_name: RwLock<Option<String>>,
pub crate_root: RwLock<Option<String>>,
pub module_path: RwLock<Option<String>>,
pub module_root: RwLock<Option<String>>,
}Fields§
§base: BlockBase<'blk>§file_name: Option<String>§crate_name: RwLock<Option<String>>Crate name from Cargo.toml [package] name
crate_root: RwLock<Option<String>>Crate/package root directory path
module_path: RwLock<Option<String>>Module path relative to crate root (e.g., “utils::helpers”)
module_root: RwLock<Option<String>>Module root directory path
Implementations§
Source§impl<'blk> BlockRoot<'blk>
impl<'blk> BlockRoot<'blk>
pub fn new( id: BlockId, node: HirNode<'blk>, parent: Option<BlockId>, children: Vec<BlockId>, file_name: Option<String>, ) -> Self
pub fn new_with_symbol( id: BlockId, node: HirNode<'blk>, parent: Option<BlockId>, children: Vec<BlockId>, file_name: Option<String>, symbol: Option<&'blk Symbol>, ) -> Self
pub fn set_crate_name(&self, name: String)
pub fn get_crate_name(&self) -> Option<String>
pub fn set_crate_root(&self, root: String)
pub fn get_crate_root(&self) -> Option<String>
pub fn set_module_path(&self, path: String)
pub fn get_module_path(&self) -> Option<String>
pub fn set_module_root(&self, root: String)
pub fn get_module_root(&self) -> Option<String>
pub fn format(&self) -> String
Trait Implementations§
Source§impl<'a> ArenaInsert<'a> for BlockRoot<'a>
impl<'a> ArenaInsert<'a> for BlockRoot<'a>
fn insert_into(self, arena: &'a ArenaInner) -> &'a Self
Source§impl<'a> ArenaInsertWithId<'a> for BlockRoot<'a>
impl<'a> ArenaInsertWithId<'a> for BlockRoot<'a>
fn insert_with_id(self, arena: &'a ArenaInner, id: usize) -> &'a Self
Auto Trait Implementations§
impl<'blk> !Freeze for BlockRoot<'blk>
impl<'blk> !RefUnwindSafe for BlockRoot<'blk>
impl<'blk> Send for BlockRoot<'blk>
impl<'blk> Sync for BlockRoot<'blk>
impl<'blk> Unpin for BlockRoot<'blk>
impl<'blk> !UnwindSafe for BlockRoot<'blk>
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 more