pub struct ClassDef {Show 18 fields
pub name: Box<str>,
pub fqn: Box<str>,
pub kind: ClassKind,
pub is_abstract: bool,
pub is_readonly: bool,
pub is_backed_enum: bool,
pub parent: Option<Arc<str>>,
pub implements: Vec<Arc<str>>,
pub traits: Vec<Arc<str>>,
pub methods: Vec<MethodDef>,
pub properties: Vec<PropertyDef>,
pub constants: Vec<Box<str>>,
pub cases: Vec<Box<str>>,
pub start_line: u32,
pub name_char: u32,
pub doc_methods: Vec<DocMethodEntry>,
pub mixins: Vec<Arc<str>>,
pub trait_method_aliases: Vec<TraitMethodAlias>,
}Fields§
§name: Box<str>§fqn: Box<str>Fully-qualified name.
kind: ClassKind§is_abstract: bool§is_readonly: booltrue for readonly class Foo {} (PHP 8.2+).
is_backed_enum: booltrue for backed enums (enum Status: string {}); always false for
pure enums and non-enum class kinds.
parent: Option<Arc<str>>extends clause as written in source (may be short name or FQN).
implements: Vec<Arc<str>>§traits: Vec<Arc<str>>§methods: Vec<MethodDef>§properties: Vec<PropertyDef>§constants: Vec<Box<str>>§cases: Vec<Box<str>>Enum case names (only populated for ClassKind::Enum).
start_line: u32§name_char: u32Character position of the class/interface/trait/enum name on its line (UTF-16 code units).
doc_methods: Vec<DocMethodEntry>Virtual methods declared via @method docblock tags.
mixins: Vec<Arc<str>>Classes/traits pulled in via @mixin ClassName docblock tags.
trait_method_aliases: Vec<TraitMethodAlias>Method aliases introduced by use Trait { method as alias; } in this class.
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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