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
source§impl PartialEq<Closure> for Closure
impl PartialEq<Closure> for Closure
impl StructuralPartialEq for Closure
Auto Trait Implementations§
impl RefUnwindSafe for Closure
impl Send for Closure
impl Sync for Closure
impl Unpin for Closure
impl UnwindSafe for Closure
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