Struct ext_php_rs::class::ClassMetadata
source · pub struct ClassMetadata<T> { /* private fields */ }
Expand description
Stores the class entry and handlers for a Rust type which has been exported to PHP. Usually allocated statically.
Implementations§
source§impl<T> ClassMetadata<T>
impl<T> ClassMetadata<T>
source§impl<T: RegisteredClass> ClassMetadata<T>
impl<T: RegisteredClass> ClassMetadata<T>
sourcepub fn handlers(&self) -> &ZendObjectHandlers
pub fn handlers(&self) -> &ZendObjectHandlers
Returns an immutable reference to the object handlers contained inside the class metadata.
sourcepub fn ce(&self) -> &'static ClassEntry
pub fn ce(&self) -> &'static ClassEntry
Retrieves a reference to the stored class entry.
Panics
Panics if there is no class entry stored inside the class metadata.
sourcepub fn set_ce(&self, ce: &'static mut ClassEntry)
pub fn set_ce(&self, ce: &'static mut ClassEntry)
Stores a reference to a class entry inside the class metadata.
Parameters
ce
- The class entry to store.
Panics
Panics if the class entry has already been set in the class metadata. This function should only be called once.