pub struct Closure {
pub name: Option<Ident>,
pub body: Box<Expr>,
pub body_ty: Option<Ty>,
pub args: Vec<Expr>,
pub params: Vec<FuncParam>,
pub named_params: Vec<FuncParam>,
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<FuncParam>
§named_params: Vec<FuncParam>
§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