pub struct TypeAliasRegistry { /* private fields */ }Expand description
型エイリアス情報を管理する軽量レジストリ。
§Design Rationale
- String-free: PureTypeを直接保持し、必要な時だけ文字列化
- Lazy evaluation: Spec<G,T>パターン解析は呼び出し時に実行
- Shared reference: TypeFlowV2とSpecFlowが同じデータを参照
Implementations§
Source§impl TypeAliasRegistry
impl TypeAliasRegistry
Sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
予想サイズでレジストリを作成。
Sourcepub fn add(&mut self, entry: TypeAliasEntry)
pub fn add(&mut self, entry: TypeAliasEntry)
エントリを追加。
Sourcepub fn get(&self, alias_id: SymbolId) -> Option<&TypeAliasEntry>
pub fn get(&self, alias_id: SymbolId) -> Option<&TypeAliasEntry>
alias_idでエントリを取得。
Sourcepub fn iter(&self) -> impl Iterator<Item = &TypeAliasEntry>
pub fn iter(&self) -> impl Iterator<Item = &TypeAliasEntry>
全エントリをイテレート。
Sourcepub fn spec_aliases(&self) -> impl Iterator<Item = SpecAliasInfo<'_>>
pub fn spec_aliases(&self) -> impl Iterator<Item = SpecAliasInfo<'_>>
Spec<G, T>パターンを持つエイリアスをイテレート。
遅延評価:各エントリに対してパターンマッチを実行。
Trait Implementations§
Source§impl Clone for TypeAliasRegistry
impl Clone for TypeAliasRegistry
Source§fn clone(&self) -> TypeAliasRegistry
fn clone(&self) -> TypeAliasRegistry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TypeAliasRegistry
impl Debug for TypeAliasRegistry
Source§impl Default for TypeAliasRegistry
impl Default for TypeAliasRegistry
Source§fn default() -> TypeAliasRegistry
fn default() -> TypeAliasRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TypeAliasRegistry
impl RefUnwindSafe for TypeAliasRegistry
impl Send for TypeAliasRegistry
impl Sync for TypeAliasRegistry
impl Unpin for TypeAliasRegistry
impl UnsafeUnpin for TypeAliasRegistry
impl UnwindSafe for TypeAliasRegistry
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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