pub enum StructKind<Name, Elements> {
Tuple(Name, Elements),
NamedFields(Name, Elements),
}Expand description
Completes the struct definition as either a named tuple or a struct with named fields.
Variants§
Tuple(Name, Elements)
A named tuple. This will function similarly to NamedTuple, except a semicolon will be added afterward.
Name must be writable, and Elements must be a writable sequence for the tuple arguments.
NamedFields(Name, Elements)
A struct with named fields. This will function similarly to StructCall.
Name must be writable, and Elements must be writable sequence for the struct fields.
Trait Implementations§
Source§impl<Name: Clone, Elements: Clone> Clone for StructKind<Name, Elements>
impl<Name: Clone, Elements: Clone> Clone for StructKind<Name, Elements>
Source§fn clone(&self) -> StructKind<Name, Elements>
fn clone(&self) -> StructKind<Name, Elements>
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<Name, Elements> Freeze for StructKind<Name, Elements>
impl<Name, Elements> RefUnwindSafe for StructKind<Name, Elements>where
Name: RefUnwindSafe,
Elements: RefUnwindSafe,
impl<Name, Elements> Send for StructKind<Name, Elements>
impl<Name, Elements> Sync for StructKind<Name, Elements>
impl<Name, Elements> Unpin for StructKind<Name, Elements>
impl<Name, Elements> UnwindSafe for StructKind<Name, Elements>where
Name: UnwindSafe,
Elements: UnwindSafe,
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