pub trait IntoZendObject {
// Required method
fn into_zend_object(self) -> Result<ZBox<ZendObject>>;
}Expand description
Implemented on types which can be converted into a Zend object. It is up to the implementation to determine the type of object which is produced.
Required Methods§
Sourcefn into_zend_object(self) -> Result<ZBox<ZendObject>>
fn into_zend_object(self) -> Result<ZBox<ZendObject>>
Attempts to convert self into a Zend object.
§Errors
Error::ZvalConversion- If the value has no object representation.Error::InvalidScope- If the class of the object has not been registered with the engine.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl IntoZendObject for Closure
Available on crate feature
closure only.impl<T> IntoZendObject for Twhere
T: RegisteredEnum + RegisteredClass,
Available on crate feature
enum only.