pub struct SpecFuncDefns {
defns: FxHashMap<Symbol, SpecFunc>,
}
Fields§
§defns: FxHashMap<Symbol, SpecFunc>
Implementations§
Source§impl SpecFuncDefns
impl SpecFuncDefns
pub fn new(defns: FxHashMap<Symbol, SpecFunc>) -> Result<Self, Vec<Symbol>>
fn defn_deps(&self, expr: &Binder<Expr>) -> FxHashSet<Symbol>
Sourcefn sorted_defns(&self) -> Result<Vec<Symbol>, Vec<Symbol>>
fn sorted_defns(&self) -> Result<Vec<Symbol>, Vec<Symbol>>
Returns
- either Ok(d1…dn) which are topologically sorted such that forall i < j, di does not depend on i.e. “call” dj
- or Err(d1…dn) where d1 ‘calls’ d2 ‘calls’ … ‘calls’ dn ‘calls’ d1
fn normalize(self) -> Result<Self, Vec<Symbol>>
fn func_defn(&self, f: &Symbol) -> Option<&SpecFunc>
Trait Implementations§
Source§impl Default for SpecFuncDefns
impl Default for SpecFuncDefns
Source§fn default() -> SpecFuncDefns
fn default() -> SpecFuncDefns
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SpecFuncDefns
impl RefUnwindSafe for SpecFuncDefns
impl Send for SpecFuncDefns
impl Sync for SpecFuncDefns
impl Unpin for SpecFuncDefns
impl UnwindSafe for SpecFuncDefns
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