pub struct Constructor {
pub name: Ident,
pub docs: Vec<String>,
pub attrs: Vec<Attribute>,
pub args: Telescope<Argument>,
pub typ: Option<Box<Expr>>,
}
Expand description
A single cosntructor inside the algebraic data type definition.
Fields§
§name: Ident
§docs: Vec<String>
§attrs: Vec<Attribute>
§args: Telescope<Argument>
§typ: Option<Box<Expr>>
Implementations§
Source§impl Constructor
impl Constructor
pub fn extract_book_info(&self, def: &SumTypeDecl) -> EntryMeta
Trait Implementations§
Source§impl Clone for Constructor
impl Clone for Constructor
Source§fn clone(&self) -> Constructor
fn clone(&self) -> Constructor
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 moreSource§impl Debug for Constructor
impl Debug for Constructor
Auto Trait Implementations§
impl Freeze for Constructor
impl RefUnwindSafe for Constructor
impl Send for Constructor
impl Sync for Constructor
impl Unpin for Constructor
impl UnwindSafe for Constructor
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