pub struct BlockModule<'blk> {
pub base: BlockBase<'blk>,
pub name: String,
pub is_inline: bool,
}Expand description
Block representing a module declaration (mod foo or mod foo { ... })
Fields§
§base: BlockBase<'blk>§name: StringModule name (e.g., “utils” for mod utils;)
is_inline: boolWhether this is an inline module (mod foo { ... }) vs file module (mod foo;)
Implementations§
Source§impl<'blk> BlockModule<'blk>
impl<'blk> BlockModule<'blk>
pub fn new( id: BlockId, node: HirNode<'blk>, parent: Option<BlockId>, children: Vec<BlockId>, name: String, is_inline: bool, ) -> Self
pub fn new_with_symbol( id: BlockId, node: HirNode<'blk>, parent: Option<BlockId>, children: Vec<BlockId>, name: String, is_inline: bool, symbol: Option<&'blk Symbol>, ) -> Self
pub fn format(&self) -> String
Trait Implementations§
Source§impl<'a> ArenaInsert<'a> for BlockModule<'a>
impl<'a> ArenaInsert<'a> for BlockModule<'a>
fn insert_into(self, arena: &'a ArenaInner) -> &'a Self
Source§impl<'a> ArenaInsertWithId<'a> for BlockModule<'a>
impl<'a> ArenaInsertWithId<'a> for BlockModule<'a>
fn insert_with_id(self, arena: &'a ArenaInner, id: usize) -> &'a Self
Auto Trait Implementations§
impl<'blk> !Freeze for BlockModule<'blk>
impl<'blk> !RefUnwindSafe for BlockModule<'blk>
impl<'blk> Send for BlockModule<'blk>
impl<'blk> Sync for BlockModule<'blk>
impl<'blk> Unpin for BlockModule<'blk>
impl<'blk> !UnwindSafe for BlockModule<'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