#[non_exhaustive]pub enum PatFieldAssign {
Assign {
name: Identifier,
pat: Pat,
pos: Pos,
span: Span,
},
Pun {
name: Identifier,
pos: Pos,
span: Span,
},
Wildcard {
pos: Pos,
span: Span,
},
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Assign
Explicit record-pattern assignment: field = pattern.
Fields
§
name: IdentifierField being matched.
Pun
Record-pattern pun: field, meaning field = field.
Fields
§
name: IdentifierPunned field name.
Wildcard
Record-pattern wildcard: ...
Implementations§
Trait Implementations§
Source§impl Clone for PatFieldAssign
impl Clone for PatFieldAssign
Source§fn clone(&self) -> PatFieldAssign
fn clone(&self) -> PatFieldAssign
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PatFieldAssign
impl Debug for PatFieldAssign
impl Eq for PatFieldAssign
Source§impl PartialEq for PatFieldAssign
impl PartialEq for PatFieldAssign
Source§fn eq(&self, other: &PatFieldAssign) -> bool
fn eq(&self, other: &PatFieldAssign) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PatFieldAssign
Auto Trait Implementations§
impl Freeze for PatFieldAssign
impl RefUnwindSafe for PatFieldAssign
impl Send for PatFieldAssign
impl Sync for PatFieldAssign
impl Unpin for PatFieldAssign
impl UnsafeUnpin for PatFieldAssign
impl UnwindSafe for PatFieldAssign
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