pub struct UnitIndex { /* private fields */ }Expand description
Expression-scope units after bind: every declarer per bare unit name.
Implementations§
Source§impl UnitIndex
impl UnitIndex
pub fn new() -> Self
pub fn unique_owner(&self, bare: &str) -> Option<&Arc<LemmaType>>
pub fn owners_for(&self, bare: &str) -> &[UnitOwner]
pub fn iter_entries(&self) -> impl Iterator<Item = (&str, &Arc<LemmaType>)>
pub fn iter_owners(&self) -> impl Iterator<Item = (&str, &UnitOwner)>
pub fn values(&self) -> impl Iterator<Item = &Arc<LemmaType>>
Sourcepub fn family_root(&self, family: &TypeFamily) -> Option<&Arc<LemmaType>>
pub fn family_root(&self, family: &TypeFamily) -> Option<&Arc<LemmaType>>
Family-root type for family, keyed by full TypeFamily identity.
pub fn keys(&self) -> impl Iterator<Item = &String>
pub fn insert_owner(&mut self, bare: String, owner: UnitOwner)
Sourcepub fn insert_list_row_owner(&mut self, bare: String, owner: UnitOwner)
pub fn insert_list_row_owner(&mut self, bare: String, owner: UnitOwner)
See [PlanningUnitIndex::insert_list_row_owner].
pub fn resolve( &self, unit_ref: &str, ) -> Result<(String, Arc<LemmaType>), String>
Sourcepub fn instance_routes(&self, bare: &str) -> Vec<(String, &UnitOwner)>
pub fn instance_routes(&self, bare: &str) -> Vec<(String, &UnitOwner)>
One alias.Type.unit route per instance that declares the bare unit bare,
with its owner, in route order. Empty when bare names at most one instance.
pub fn resolve_owner( &self, unit_ref: &str, ) -> Result<(String, &UnitOwner), String>
pub fn resolve_via_named_measure_type( unit_ref: &str, resolved: &IndexMap<String, Arc<LemmaType>>, ) -> Option<(String, Arc<LemmaType>)>
pub fn resolve_with_named_types( &self, unit_ref: &str, resolved: &IndexMap<String, Arc<LemmaType>>, ) -> Result<(String, Arc<LemmaType>), String>
pub fn owning_type_for_signature_factor<'a>( &'a self, unit_name: &str, typed_owners: &[&'a LemmaType], ) -> Option<&'a LemmaType>
Trait Implementations§
Auto Trait Implementations§
impl Forget for UnitIndex
impl Freeze for UnitIndexwhere
*const u8 is !null: Freeze,
PhantomData<usize>: Freeze,
PhantomData<Bucket<String, Vec<UnitOwner>>>: Freeze,
PhantomData<Bucket<(String, Option<(Vec<String>, String)>), usize>>: Freeze,
PhantomData<Bucket<(Vec<String>, String), Arc<LemmaType>>>: Freeze,
*const LeafNode<TypeFamily, Arc<LemmaType>> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(TypeFamily, Arc<LemmaType>)>>: Freeze,
impl Move for UnitIndex
impl RefUnwindSafe for UnitIndex
impl Send for UnitIndex
impl Sync for UnitIndex
impl Unpin for UnitIndex
impl UnsafeUnpin for UnitIndexwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<usize>: UnsafeUnpin,
PhantomData<Bucket<String, Vec<UnitOwner>>>: UnsafeUnpin,
PhantomData<Bucket<(String, Option<(Vec<String>, String)>), usize>>: UnsafeUnpin,
PhantomData<Bucket<(Vec<String>, String), Arc<LemmaType>>>: UnsafeUnpin,
*const LeafNode<TypeFamily, Arc<LemmaType>> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(TypeFamily, Arc<LemmaType>)>>: UnsafeUnpin,
impl UnwindSafe for UnitIndexwhere
NonNull<u8>: UnwindSafe,
RawVecInner: UnwindSafe,
Arc<LemmaType>: UnwindSafe,
BTreeMap<TypeFamily, Arc<LemmaType>>: UnwindSafe,
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