pub trait FromZvalMut<'a>: Sized {
    const TYPE: DataType;

    // Required method
    fn from_zval_mut(zval: &'a mut Zval) -> Option<Self>;
}
Expand description

Allows mutable zvals to be converted into Rust types in a fallible way.

If Self does not require the zval to be mutable to be extracted, you should implement FromZval instead, as this trait is generically implemented for any type that implements FromZval.

Required Associated Constants§

source

const TYPE: DataType

The corresponding type of the implemented value in PHP.

Required Methods§

source

fn from_zval_mut(zval: &'a mut Zval) -> Option<Self>

Attempts to retrieve an instance of Self from a mutable reference to a Zval.

§Parameters
  • zval - Zval to get value from.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<'a> FromZvalMut<'a> for &'a mut Closure

Available on crate feature closure only.
source§

impl<'a> FromZvalMut<'a> for &'a mut ZendIterator

source§

impl<'a> FromZvalMut<'a> for &'a mut ZendObject

source§

impl<'a> FromZvalMut<'a> for &'a mut Zval

source§

const TYPE: DataType = DataType::Mixed

source§

impl<'a, T> FromZvalMut<'a> for T
where T: FromZval<'a>,

source§

const TYPE: DataType = <T as FromZval>::TYPE

source§

impl<'a, T: RegisteredClass> FromZvalMut<'a> for &'a mut ZendClassObject<T>