pub struct StructField { /* private fields */ }Implementations§
Source§impl StructField
impl StructField
pub fn name_token(&self) -> Option<SyntaxToken>
Sourcepub fn type_annotation(&self) -> Option<TypeAnnotation>
pub fn type_annotation(&self) -> Option<TypeAnnotation>
The field’s : type annotation (NG-E, issue #1505) — a full
type_expr (bare name, generic instantiation, or function type),
the same production every other : type position in this grammar
uses (Param::type_annotation, VarDecl::type_annotation, …).
Trait Implementations§
Source§impl AstNode for StructField
impl AstNode for StructField
Source§fn can_cast(kind: SyntaxKind) -> bool
fn can_cast(kind: SyntaxKind) -> bool
Returns
true for a node with a SyntaxKind this type can wrap.Source§fn cast(node: SyntaxNode) -> Option<Self>
fn cast(node: SyntaxNode) -> Option<Self>
Try to cast a generic
SyntaxNode into this typed wrapper.Source§fn syntax(&self) -> &SyntaxNode
fn syntax(&self) -> &SyntaxNode
Access the underlying
SyntaxNode.Source§impl Clone for StructField
impl Clone for StructField
Source§fn clone(&self) -> StructField
fn clone(&self) -> StructField
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 StructField
impl Debug for StructField
Source§impl Display for StructField
impl Display for StructField
impl Eq for StructField
Source§impl Hash for StructField
impl Hash for StructField
Source§impl PartialEq for StructField
impl PartialEq for StructField
impl StructuralPartialEq for StructField
Auto Trait Implementations§
impl !RefUnwindSafe for StructField
impl !Send for StructField
impl !Sync for StructField
impl !UnwindSafe for StructField
impl Freeze for StructField
impl Unpin for StructField
impl UnsafeUnpin for StructField
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