Skip to main content

PhpClass

Trait PhpClass 

Source
pub trait PhpClass: RegisteredClass { }
Expand description

A RegisteredClass whose PHP objects hold a Rust value of this type.

The crate::php_class macro implements it. The PHP objects of a #[php_enum] or #[php_interface] type hold no Rust value, so these types do not implement it. Only a PhpClass type can be a &T, &mut T, ClassRef<T> or ClassRefMut<T> parameter.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl PhpClass for Closure

Available on crate feature closure only.