Trait rustc::middle::ty::ClosureTyper
[−]
[src]
pub trait ClosureTyper<'tcx> {
fn param_env<'a>(&'a self) -> &'a ParameterEnvironment<'a, 'tcx>;
fn closure_kind(&self, def_id: DefId) -> Option<ClosureKind>;
fn closure_type(&self, def_id: DefId, substs: &Substs<'tcx>) -> ClosureTy<'tcx>;
fn closure_upvars(&self, def_id: DefId, substs: &Substs<'tcx>) -> Option<Vec<ClosureUpvar<'tcx>>>;
fn tcx(&self) -> &ctxt<'tcx> { ... }
}Unstable
Required Methods
fn param_env<'a>(&'a self) -> &'a ParameterEnvironment<'a, 'tcx>
Unstable
fn closure_kind(&self, def_id: DefId) -> Option<ClosureKind>
Unstable
Is this a Fn, FnMut or FnOnce closure? During typeck,
returns None if the kind of this closure has not yet been
inferred.
fn closure_type(&self, def_id: DefId, substs: &Substs<'tcx>) -> ClosureTy<'tcx>
Unstable
Returns the argument/return types of this closure.
fn closure_upvars(&self, def_id: DefId, substs: &Substs<'tcx>) -> Option<Vec<ClosureUpvar<'tcx>>>
Unstable
Returns the set of all upvars and their transformed
types. During typeck, maybe return None if the upvar types
have not yet been inferred.
Provided Methods
Implementors
impl<'a, 'tcx> ClosureTyper<'tcx> for ParameterEnvironment<'a, 'tcx>