Struct FieldPat
pub struct FieldPat { pub attrs: Vec<Attribute>, pub member: Member, pub colon_token: Option<Colon>, pub pat: Box<Pat> }
A single field in a struct pattern.
Patterns like the fields of Pat { x, ref y, ref mut z } are treated
the same as x: x, y: ref y, z: ref mut z but there is no colon token.
Fields
attrs: Vec<Attribute>member: Membercolon_token: Option<Colon>pat: Box<Pat>
Trait Implementations
impl Clone for FieldPat
fn clone(&self) -> Self
impl ToTokens for FieldPat
fn to_tokens(&self, tokens: &mut TokenStream)
Auto Trait Implementations
impl !Send for FieldPat
impl !Sync for FieldPat
impl Freeze for FieldPat
impl RefUnwindSafe for FieldPat
impl Unpin for FieldPat
impl UnsafeUnpin for FieldPat
impl UnwindSafe for FieldPat
Blanket Implementations
impl<T> Any for FieldPat
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for FieldPat
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for FieldPat
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for FieldPat
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for FieldPat
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Spanned for FieldPat
where
T: Spanned + ?Sized,
fn span(&self) -> Span
impl<T> ToOwned for FieldPat
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T, U> Into<U> for FieldPat
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for FieldPat
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for FieldPat
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>