Skip to main content

RegionEvent

Struct RegionEvent 

Source
pub struct RegionEvent<Id, Key> {
    pub kind: EventKind,
    pub node: Id,
    pub key: Key,
}
Expand description

区域扫描事件(使用索引的原子):语句子树遍历中的一次读/写/遮蔽。 node 指向承载名字的节点(Use→VarRef;Write→赋值目标 VarRef 或 声明节点;Shadow→VarDecl/ForEach/Catch 绑定节点),名字由 Lang::var_name(node) 读取——与 scan_region 原递归的判定一致。

Fields§

§kind: EventKind§node: Id§key: Key

事件承载者的名字键(语言侧等价类:Java=u32 intern id)—— 事件构建时预存,查询侧比较为整数等值,免 var_name/memcmp。

Trait Implementations§

Source§

impl<Id: Clone, Key: Clone> Clone for RegionEvent<Id, Key>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<Id: Copy, Key: Copy> Copy for RegionEvent<Id, Key>

Source§

impl<Id: Debug, Key: Debug> Debug for RegionEvent<Id, Key>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<Id, Key> Freeze for RegionEvent<Id, Key>
where Id: Freeze, Key: Freeze,

§

impl<Id, Key> RefUnwindSafe for RegionEvent<Id, Key>
where Id: RefUnwindSafe, Key: RefUnwindSafe,

§

impl<Id, Key> Send for RegionEvent<Id, Key>
where Id: Send, Key: Send,

§

impl<Id, Key> Sync for RegionEvent<Id, Key>
where Id: Sync, Key: Sync,

§

impl<Id, Key> Unpin for RegionEvent<Id, Key>
where Id: Unpin, Key: Unpin,

§

impl<Id, Key> UnsafeUnpin for RegionEvent<Id, Key>
where Id: UnsafeUnpin, Key: UnsafeUnpin,

§

impl<Id, Key> UnwindSafe for RegionEvent<Id, Key>
where Id: UnwindSafe, Key: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.