pub struct RecordDecl {
pub name: QualifiedIdent,
pub docs: Vec<String>,
pub parameters: Telescope<Argument>,
pub constructor: Ident,
pub fields: Vec<(Ident, Vec<String>, Box<Expr>)>,
pub attrs: Vec<Attribute>,
pub cons_attrs: Vec<Attribute>,
}
Expand description
A single constructor data type.
Fields§
§name: QualifiedIdent
§docs: Vec<String>
§parameters: Telescope<Argument>
§constructor: Ident
§fields: Vec<(Ident, Vec<String>, Box<Expr>)>
§attrs: Vec<Attribute>
§cons_attrs: Vec<Attribute>
Implementations§
Source§impl RecordDecl
impl RecordDecl
pub fn get_constructor(&self) -> Constructor
Source§impl RecordDecl
impl RecordDecl
pub fn fields_to_arguments(&self) -> Telescope<Argument>
pub fn extract_book_info(&self) -> EntryMeta
pub fn extract_book_info_of_constructor(&self) -> EntryMeta
Trait Implementations§
Source§impl Clone for RecordDecl
impl Clone for RecordDecl
Source§fn clone(&self) -> RecordDecl
fn clone(&self) -> RecordDecl
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for RecordDecl
impl RefUnwindSafe for RecordDecl
impl Send for RecordDecl
impl Sync for RecordDecl
impl Unpin for RecordDecl
impl UnwindSafe for RecordDecl
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