pub struct ClassDef {Show 21 fields
pub fqcn: Arc<str>,
pub short_name: Arc<str>,
pub parent: Option<Arc<str>>,
pub interfaces: Vec<Arc<str>>,
pub traits: Vec<Arc<str>>,
pub own_methods: IndexMap<Arc<str>, Arc<MethodDef>>,
pub own_properties: IndexMap<Arc<str>, PropertyDef>,
pub own_constants: IndexMap<Arc<str>, ConstantDef>,
pub mixins: Vec<Arc<str>>,
pub template_params: Vec<TemplateParam>,
pub extends_type_args: Vec<Type>,
pub implements_type_args: Vec<(Arc<str>, Vec<Type>)>,
pub is_abstract: bool,
pub is_final: bool,
pub is_readonly: bool,
pub deprecated: Option<Arc<str>>,
pub is_internal: bool,
pub location: Option<Location>,
pub trait_use_locations: Vec<(Arc<str>, Location)>,
pub type_aliases: FxHashMap<Arc<str>, Type>,
pub pending_import_types: Vec<(Arc<str>, Arc<str>, Arc<str>)>,
}Fields§
§fqcn: Arc<str>§short_name: Arc<str>§parent: Option<Arc<str>>§interfaces: Vec<Arc<str>>§traits: Vec<Arc<str>>§own_methods: IndexMap<Arc<str>, Arc<MethodDef>>§own_properties: IndexMap<Arc<str>, PropertyDef>§own_constants: IndexMap<Arc<str>, ConstantDef>§mixins: Vec<Arc<str>>§template_params: Vec<TemplateParam>§extends_type_args: Vec<Type>Type arguments from @extends ParentClass<T1, T2> — maps parent’s template params to concrete types.
implements_type_args: Vec<(Arc<str>, Vec<Type>)>Type arguments from @implements Interface<T1, T2>.
is_abstract: bool§is_final: bool§is_readonly: bool§deprecated: Option<Arc<str>>§is_internal: bool§location: Option<Location>§trait_use_locations: Vec<(Arc<str>, Location)>Per-use statement locations for each used trait: (fqcn, location) in
declaration order, parallel to traits. Absent from older serialized
slices; defaults to empty.
type_aliases: FxHashMap<Arc<str>, Type>Type aliases declared on this class via @psalm-type / @phpstan-type.
pending_import_types: Vec<(Arc<str>, Arc<str>, Arc<str>)>Raw import-type declarations ((local_name, original_name, from_class)) — resolved during finalization.
Implementations§
Source§impl ClassDef
impl ClassDef
pub fn get_method(&self, name: &str) -> Option<&MethodDef>
pub fn get_property(&self, name: &str) -> Option<&PropertyDef>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ClassDef
impl<'de> Deserialize<'de> for ClassDef
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for ClassDef
Auto Trait Implementations§
impl Freeze for ClassDef
impl RefUnwindSafe for ClassDef
impl Send for ClassDef
impl Sync for ClassDef
impl Unpin for ClassDef
impl UnsafeUnpin for ClassDef
impl UnwindSafe for ClassDef
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