pub struct BlockImpl<'blk> {
pub base: BlockBase<'blk>,
pub name: String,
pub target: RwLock<Option<BlockId>>,
pub target_sym: Option<&'blk Symbol>,
pub trait_ref: RwLock<Option<BlockId>>,
pub trait_sym: Option<&'blk Symbol>,
pub methods: RwLock<Vec<BlockId>>,
}Fields§
§base: BlockBase<'blk>§name: String§target: RwLock<Option<BlockId>>Target type block ID (resolved during connect_blocks if needed)
target_sym: Option<&'blk Symbol>Target type symbol (for deferred block_id resolution)
trait_ref: RwLock<Option<BlockId>>Trait block ID (resolved during connect_blocks if needed)
trait_sym: Option<&'blk Symbol>Trait symbol (for deferred block_id resolution)
methods: RwLock<Vec<BlockId>>Implementations§
Source§impl<'blk> BlockImpl<'blk>
impl<'blk> BlockImpl<'blk>
pub fn new( id: BlockId, node: HirNode<'blk>, parent: Option<BlockId>, children: Vec<BlockId>, ) -> Self
pub fn new_with_symbol( id: BlockId, node: HirNode<'blk>, parent: Option<BlockId>, children: Vec<BlockId>, symbol: Option<&'blk Symbol>, ) -> Self
Sourcepub fn set_target_info(
&mut self,
block_id: Option<BlockId>,
sym: Option<&'blk Symbol>,
)
pub fn set_target_info( &mut self, block_id: Option<BlockId>, sym: Option<&'blk Symbol>, )
Set target with both block_id (if available) and symbol (for deferred resolution)
Sourcepub fn set_trait_info(
&mut self,
block_id: Option<BlockId>,
sym: Option<&'blk Symbol>,
)
pub fn set_trait_info( &mut self, block_id: Option<BlockId>, sym: Option<&'blk Symbol>, )
Set trait with both block_id (if available) and symbol (for deferred resolution)
pub fn set_target(&self, target_id: BlockId)
pub fn set_trait_ref(&self, trait_id: BlockId)
pub fn add_method(&self, method_id: BlockId)
pub fn get_target(&self) -> Option<BlockId>
pub fn get_trait_ref(&self) -> Option<BlockId>
pub fn get_methods(&self) -> Vec<BlockId>
pub fn format(&self) -> String
Trait Implementations§
Source§impl<'a> ArenaInsert<'a> for BlockImpl<'a>
impl<'a> ArenaInsert<'a> for BlockImpl<'a>
fn insert_into(self, arena: &'a ArenaInner) -> &'a Self
Source§impl<'a> ArenaInsertWithId<'a> for BlockImpl<'a>
impl<'a> ArenaInsertWithId<'a> for BlockImpl<'a>
fn insert_with_id(self, arena: &'a ArenaInner, id: usize) -> &'a Self
Auto Trait Implementations§
impl<'blk> !Freeze for BlockImpl<'blk>
impl<'blk> !RefUnwindSafe for BlockImpl<'blk>
impl<'blk> Send for BlockImpl<'blk>
impl<'blk> Sync for BlockImpl<'blk>
impl<'blk> Unpin for BlockImpl<'blk>
impl<'blk> !UnwindSafe for BlockImpl<'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