pub struct NameReader<'a> { /* private fields */ }
Expand description
A reference to a nameset which can read name mappings while tracking dependencies.
Implementations§
Source§impl<'a> NameReader<'a>
impl<'a> NameReader<'a>
Sourcepub fn new(nameset: &'a Nameset) -> Self
pub fn new(nameset: &'a Nameset) -> Self
Constructs a reading interface for a nameset and starts recording names used.
Sourcepub fn into_usage(self) -> NameUsage
pub fn into_usage(self) -> NameUsage
Stops the reading process. The returned usage object can be used to efficiently test for relevant updates.
Sourcepub fn lookup_label(&mut self, label: TokenPtr<'_>) -> Option<LookupLabel>
pub fn lookup_label(&mut self, label: TokenPtr<'_>) -> Option<LookupLabel>
Looks up the address and atom for a statement label.
Sourcepub fn lookup_symbol(&mut self, symbol: TokenPtr<'_>) -> Option<LookupSymbol>
pub fn lookup_symbol(&mut self, symbol: TokenPtr<'_>) -> Option<LookupSymbol>
Looks up the address and type for a math symbol.
Sourcepub fn lookup_float(&mut self, symbol: TokenPtr<'_>) -> Option<LookupFloat<'a>>
pub fn lookup_float(&mut self, symbol: TokenPtr<'_>) -> Option<LookupFloat<'a>>
Looks up the float declaration for a math symbol.
Sourcepub const fn lookup_global_dv(&self) -> &Vec<(StatementAddress, Vec<Atom>)>
pub const fn lookup_global_dv(&self) -> &Vec<(StatementAddress, Vec<Atom>)>
Looks up the list of all global $d statements.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for NameReader<'a>
impl<'a> RefUnwindSafe for NameReader<'a>
impl<'a> Send for NameReader<'a>
impl<'a> Sync for NameReader<'a>
impl<'a> Unpin for NameReader<'a>
impl<'a> UnwindSafe for NameReader<'a>
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> 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