pub struct Lean4Def {
pub name: String,
pub type_params: Vec<(String, String)>,
pub args: Vec<(String, Lean4Type)>,
pub type_ascription: Option<Lean4Type>,
pub body: Lean4Expr,
pub doc_comment: Option<String>,
pub attributes: Vec<String>,
pub is_noncomputable: bool,
pub is_private: bool,
}Expand description
A Lean 4 def definition.
Fields§
§name: StringName of the definition
type_params: Vec<(String, String)>Universe-polymorphic type parameters: {u v : Type}
args: Vec<(String, Lean4Type)>Term-level arguments: (x : Nat) (y : Bool)
type_ascription: Option<Lean4Type>Return type ascription
body: Lean4ExprBody expression
doc_comment: Option<String>Optional doc comment
attributes: Vec<String>Lean attributes: @[simp], @[inline], etc.
is_noncomputable: boolnoncomputable
is_private: boolprivate
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Lean4Def
impl RefUnwindSafe for Lean4Def
impl Send for Lean4Def
impl Sync for Lean4Def
impl Unpin for Lean4Def
impl UnsafeUnpin for Lean4Def
impl UnwindSafe for Lean4Def
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