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)
pub fn resolve( &self, unit_ref: &str, ) -> Result<(String, Arc<LemmaType>), String>
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 UnitIndex
impl RefUnwindSafe for UnitIndex
impl Send for UnitIndex
impl Sync for UnitIndex
impl Unpin for UnitIndex
impl UnsafeUnpin for UnitIndex
impl UnwindSafe for UnitIndex
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