pub struct ClassModel {Show 13 fields
pub name: String,
pub framework: Framework,
pub attributes: Vec<Attribute>,
pub fields: Vec<FieldInfo>,
pub methods: Vec<MethodInfo>,
pub adjusts: Vec<MethodInfo>,
pub parents: Vec<String>,
pub mro: MethodResolutionOrder,
pub roles: Vec<String>,
pub modifiers: Vec<MethodModifier>,
pub exports: Vec<String>,
pub export_ok: Vec<String>,
pub exporter_metadata: Option<ExporterMetadata>,
}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
fields: Vec<FieldInfo>Fields declared via Object::Pad field
methods: Vec<MethodInfo>Methods declared via sub
adjusts: Vec<MethodInfo>Object::Pad ADJUST blocks
parents: Vec<String>Parent classes from extends 'Parent', use parent, use base, or @ISA
mro: MethodResolutionOrderMethod-resolution order for inherited method lookup.
roles: Vec<String>Roles consumed via with 'Role'
modifiers: Vec<MethodModifier>Method modifiers (before/after/around/override/augment)
exports: Vec<String>Names exported by default via @EXPORT
export_ok: Vec<String>Names available for explicit import via @EXPORT_OK
exporter_metadata: Option<ExporterMetadata>Per-file Exporter metadata with subroutine resolution.
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.
Sourcepub fn object_pad_param_field_names(&self) -> impl Iterator<Item = &str>
pub fn object_pad_param_field_names(&self) -> impl Iterator<Item = &str>
Return the names of Object::Pad fields that participate in constructor parameters.
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