pub struct TraitDef {Show 13 fields
pub fqcn: Arc<str>,
pub short_name: Arc<str>,
pub own_methods: MemberMap<Arc<MethodDef>>,
pub own_properties: MemberMap<PropertyDef>,
pub own_constants: MemberMap<ConstantDef>,
pub template_params: Vec<TemplateParam>,
pub traits: Vec<Arc<str>>,
pub location: Option<Location>,
pub trait_use_locations: Vec<(Arc<str>, Location)>,
pub require_extends: Vec<Arc<str>>,
pub require_implements: Vec<Arc<str>>,
pub deprecated: Option<Arc<str>>,
pub type_aliases: FxHashMap<Arc<str>, Type>,
}Fields§
§fqcn: Arc<str>§short_name: Arc<str>§own_methods: MemberMap<Arc<MethodDef>>§own_properties: MemberMap<PropertyDef>§own_constants: MemberMap<ConstantDef>§template_params: Vec<TemplateParam>§traits: Vec<Arc<str>>Traits used by this trait (use OtherTrait; inside a trait body).
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. Mirrors ClassDef/EnumDef’s
field of the same name. Absent from older serialized slices; defaults
to empty.
require_extends: Vec<Arc<str>>@psalm-require-extends / @phpstan-require-extends — FQCNs that using classes must extend.
require_implements: Vec<Arc<str>>@psalm-require-implements / @phpstan-require-implements — FQCNs that using classes must implement.
deprecated: Option<Arc<str>>@deprecated docblock annotation, if present.
type_aliases: FxHashMap<Arc<str>, Type>Type aliases declared on this trait via @psalm-type / @phpstan-type.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TraitDef
impl<'de> Deserialize<'de> for TraitDef
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 TraitDef
Auto Trait Implementations§
impl Freeze for TraitDef
impl RefUnwindSafe for TraitDef
impl Send for TraitDef
impl Sync for TraitDef
impl Unpin for TraitDef
impl UnsafeUnpin for TraitDef
impl UnwindSafe for TraitDef
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