pub struct StmtClassDef {
pub node_index: AtomicNodeIndex,
pub range: TextRange,
pub decorator_list: Vec<Decorator>,
pub name: Identifier,
pub type_params: Option<Box<TypeParams>>,
pub arguments: Option<Box<Arguments>>,
pub body: Vec<Stmt>,
}Expand description
See also ClassDef
Fields§
§node_index: AtomicNodeIndex§range: TextRange§decorator_list: Vec<Decorator>§name: Identifier§type_params: Option<Box<TypeParams>>§arguments: Option<Box<Arguments>>§body: Vec<Stmt>Implementations§
Trait Implementations§
Source§impl Clone for StmtClassDef
impl Clone for StmtClassDef
Source§fn clone(&self) -> StmtClassDef
fn clone(&self) -> StmtClassDef
Returns a duplicate of the value. Read more
1.0.0 · 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 StmtClassDef
impl Debug for StmtClassDef
Source§impl<'a> From<&'a StmtClassDef> for AnyNodeRef<'a>
impl<'a> From<&'a StmtClassDef> for AnyNodeRef<'a>
Source§fn from(node: &'a StmtClassDef) -> AnyNodeRef<'a>
fn from(node: &'a StmtClassDef) -> AnyNodeRef<'a>
Converts to this type from the input type.
Source§impl<'a> From<&'a StmtClassDef> for StmtRef<'a>
impl<'a> From<&'a StmtClassDef> for StmtRef<'a>
Source§fn from(node: &'a StmtClassDef) -> Self
fn from(node: &'a StmtClassDef) -> Self
Converts to this type from the input type.
Source§impl From<StmtClassDef> for Stmt
impl From<StmtClassDef> for Stmt
Source§fn from(node: StmtClassDef) -> Self
fn from(node: StmtClassDef) -> Self
Converts to this type from the input type.
Source§impl HasNodeIndex for StmtClassDef
impl HasNodeIndex for StmtClassDef
Source§fn node_index(&self) -> &AtomicNodeIndex
fn node_index(&self) -> &AtomicNodeIndex
Returns the
AtomicNodeIndex for this node.Source§impl Identifier for StmtClassDef
impl Identifier for StmtClassDef
Source§fn identifier(&self) -> TextRange
fn identifier(&self) -> TextRange
Return the TextRange of the identifier in the given class definition.
For example, return the range of C in:
class C():
...Source§impl PartialEq for StmtClassDef
impl PartialEq for StmtClassDef
Source§impl Ranged for StmtClassDef
impl Ranged for StmtClassDef
Source§impl<'a> TryFrom<AnyRootNodeRef<'a>> for &'a StmtClassDef
impl<'a> TryFrom<AnyRootNodeRef<'a>> for &'a StmtClassDef
impl StructuralPartialEq for StmtClassDef
Auto Trait Implementations§
impl !Freeze for StmtClassDef
impl RefUnwindSafe for StmtClassDef
impl Send for StmtClassDef
impl Sync for StmtClassDef
impl Unpin for StmtClassDef
impl UnsafeUnpin for StmtClassDef
impl UnwindSafe for StmtClassDef
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more