pub struct Lean4Structure {
pub name: String,
pub type_params: Vec<(String, Lean4Type)>,
pub extends: Vec<String>,
pub fields: Vec<(String, Lean4Type, Option<Lean4Expr>)>,
pub doc_comment: Option<String>,
pub derives: Vec<String>,
}Expand description
A Lean 4 structure declaration.
Fields§
§name: StringStructure name
type_params: Vec<(String, Lean4Type)>Type parameters
extends: Vec<String>Parent structures (extends)
fields: Vec<(String, Lean4Type, Option<Lean4Expr>)>Fields: (name, type, default_value)
doc_comment: Option<String>Optional doc comment
derives: Vec<String>Derives
Implementations§
Trait Implementations§
Source§impl Clone for Lean4Structure
impl Clone for Lean4Structure
Source§fn clone(&self) -> Lean4Structure
fn clone(&self) -> Lean4Structure
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for Lean4Structure
impl RefUnwindSafe for Lean4Structure
impl Send for Lean4Structure
impl Sync for Lean4Structure
impl Unpin for Lean4Structure
impl UnsafeUnpin for Lean4Structure
impl UnwindSafe for Lean4Structure
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