struct Evaluator<'a> {
e: &'a RTsEnumDecl,
values: &'a mut FxHashMap<JsWord, RTsLit>,
errors: Errors,
}
Fields
e: &'a RTsEnumDecl
values: &'a mut FxHashMap<JsWord, RTsLit>
errors: Errors
Implementations
sourceimpl Evaluator<'_>
impl Evaluator<'_>
sourcefn compute(
&mut self,
analyzer: &mut Analyzer<'_, '_>,
span: Span,
default: Option<f64>,
init: Option<&RExpr>
) -> VResult<RTsLit>
fn compute(
&mut self,
analyzer: &mut Analyzer<'_, '_>,
span: Span,
default: Option<f64>,
init: Option<&RExpr>
) -> VResult<RTsLit>
Called only for enums.
If both of the default value and the initialization is None, this method returns Err.
fn compute_bin(
&mut self,
analyzer: &mut Analyzer<'_, '_>,
span: Span,
expr: &RBinExpr
) -> VResult<RTsLit>
fn try_str(e: &RExpr) -> Result<RStr, ()>
Auto Trait Implementations
impl<'a> RefUnwindSafe for Evaluator<'a>
impl<'a> Send for Evaluator<'a>
impl<'a> Sync for Evaluator<'a>
impl<'a> Unpin for Evaluator<'a>
impl<'a> !UnwindSafe for Evaluator<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more