Struct rustc_ast::ast::PatField [−][src]
A single field in a struct pattern.
Patterns like the fields of Foo { x, ref y, ref mut z }
are treated the same as x: x, y: ref y, z: ref mut z,
except when is_shorthand is true.
Fields
ident: IdentThe identifier for the field.
pat: P<Pat>The pattern the field is destructured to.
is_shorthand: boolattrs: AttrVecid: NodeIdspan: Spanis_placeholder: boolTrait Implementations
impl AstLike for PatField[src]
fn attrs(&self) -> &[Attribute][src]
fn visit_attrs(&mut self, f: impl FnOnce(&mut Vec<Attribute>))[src]
fn tokens_mut(&mut self) -> Option<&mut Option<LazyTokenStream>>[src]
impl Clone for PatField[src]
impl Debug for PatField[src]
impl<__D: Decoder> Decodable<__D> for PatField[src]
impl<__E: Encoder> Encodable<__E> for PatField[src]
Auto Trait Implementations
impl !RefUnwindSafe for PatField
impl !Send for PatField
impl !Sync for PatField
impl Unpin for PatField
impl !UnwindSafe for PatField
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,