pub struct StructDecl { /* private fields */ }Implementations§
Source§impl StructDecl
impl StructDecl
pub fn identifier(&self) -> Option<Identifier>
pub fn name(&self) -> Option<String>
Sourcepub fn fields(&self) -> impl Iterator<Item = StructFieldDecl>
pub fn fields(&self) -> impl Iterator<Item = StructFieldDecl>
The declared fields, in source order.
Trait Implementations§
Source§impl AstNode for StructDecl
impl AstNode for StructDecl
Source§fn can_cast(kind: SyntaxKind) -> bool
fn can_cast(kind: SyntaxKind) -> bool
Returns
true if a node with the given kind can be cast to Self.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 StructDecl
impl Clone for StructDecl
Source§fn clone(&self) -> StructDecl
fn clone(&self) -> StructDecl
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 StructDecl
impl Debug for StructDecl
Source§impl Display for StructDecl
impl Display for StructDecl
impl Eq for StructDecl
Source§impl Hash for StructDecl
impl Hash for StructDecl
Source§impl PartialEq for StructDecl
impl PartialEq for StructDecl
impl StructuralPartialEq for StructDecl
Auto Trait Implementations§
impl !RefUnwindSafe for StructDecl
impl !Send for StructDecl
impl !Sync for StructDecl
impl !UnwindSafe for StructDecl
impl Freeze for StructDecl
impl Unpin for StructDecl
impl UnsafeUnpin for StructDecl
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