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§

Creates a new class metadata instance.

Returns an immutable reference to the object handlers contained inside the class metadata.

Checks if the class entry has been stored, returning a boolean.

Retrieves a reference to the stored class entry.

Panics

Panics if there is no class entry stored inside the class metadata.

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.

Retrieves a reference to the hashmap storing the classes property accessors.

Returns

Immutable reference to the properties hashmap.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.