pub struct Closure {
pub name: Option<Ident>,
pub body: Box<Expr>,
pub body_ty: Option<Ty>,
pub args: Vec<Expr>,
pub params: Vec<ClosureParam>,
pub named_params: Vec<ClosureParam>,
pub env: HashMap<String, Expr>,
}Expand description
Function called with possibly missing positional arguments. May also contain environment that is needed to evaluate the body.
Fields§
§name: Option<Ident>§body: Box<Expr>§body_ty: Option<Ty>§args: Vec<Expr>§params: Vec<ClosureParam>§named_params: Vec<ClosureParam>§env: HashMap<String, Expr>Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for Closure
impl<'de> Deserialize<'de> for Closure
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more