pub struct ClassModel {
pub name: String,
pub framework: Framework,
pub attributes: Vec<Attribute>,
pub methods: Vec<MethodInfo>,
pub parents: Vec<String>,
pub roles: Vec<String>,
pub modifiers: Vec<MethodModifier>,
}Expand description
Structured model of a Perl OOP class or role.
Fields§
§name: StringPackage name (e.g., MyApp::User)
framework: FrameworkDetected OO framework
attributes: Vec<Attribute>Attributes declared via has
methods: Vec<MethodInfo>Methods declared via sub
parents: Vec<String>Parent classes from extends 'Parent', use parent, use base, or @ISA
roles: Vec<String>Roles consumed via with 'Role'
modifiers: Vec<MethodModifier>Method modifiers (before/after/around)
Implementations§
Source§impl ClassModel
impl ClassModel
Sourcepub fn has_framework(&self) -> bool
pub fn has_framework(&self) -> bool
Returns true if this class uses any OO framework.
Trait Implementations§
Source§impl Clone for ClassModel
impl Clone for ClassModel
Source§fn clone(&self) -> ClassModel
fn clone(&self) -> ClassModel
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 moreAuto Trait Implementations§
impl Freeze for ClassModel
impl RefUnwindSafe for ClassModel
impl Send for ClassModel
impl Sync for ClassModel
impl Unpin for ClassModel
impl UnsafeUnpin for ClassModel
impl UnwindSafe for ClassModel
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