pub struct StructConstructor {
pub name: String,
pub fields: Vec<(String, Expr)>,
pub token: Token,
}Expand description
Represents a struct constructor expression in the AST.
A struct constructor creates a new instance of a struct with the specified field values.
Fields§
§name: StringThe name of the struct being constructed.
fields: Vec<(String, Expr)>The field values for the struct.
token: TokenThe token representing the struct constructor in the source code.
Trait Implementations§
Source§impl Clone for StructConstructor
impl Clone for StructConstructor
Source§fn clone(&self) -> StructConstructor
fn clone(&self) -> StructConstructor
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 moreSource§impl Debug for StructConstructor
impl Debug for StructConstructor
Source§impl PartialEq for StructConstructor
impl PartialEq for StructConstructor
impl StructuralPartialEq for StructConstructor
Auto Trait Implementations§
impl Freeze for StructConstructor
impl RefUnwindSafe for StructConstructor
impl Send for StructConstructor
impl Sync for StructConstructor
impl Unpin for StructConstructor
impl UnwindSafe for StructConstructor
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