Skip to main content

ClassRefMut

Struct ClassRefMut 

Source
pub struct ClassRefMut<'a, T>(/* private fields */);
Expand description

Exclusive access to the Rust value of a class object.

The value cannot be borrowed again while this guard lives.

Trait Implementations§

Source§

impl<'a, T: Debug> Debug for ClassRefMut<'a, T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T> Deref for ClassRefMut<'_, T>

Source§

type Target = T

The resulting type after dereferencing.
Source§

fn deref(&self) -> &T

Dereferences the value.
Source§

impl<T> DerefMut for ClassRefMut<'_, T>

Source§

fn deref_mut(&mut self) -> &mut T

Mutably dereferences the value.
Source§

impl<'a, T: PhpClass> FromZendObject<'a> for ClassRefMut<'a, T>

Source§

fn from_zend_object(obj: &'a ZendObject) -> Result<Self>

Extracts Self from the source ZendObject. Read more
Source§

impl<'a, T: PhpClass> FromZval<'a> for ClassRefMut<'a, T>

Source§

const TYPE: DataType

The corresponding type of the implemented value in PHP.
Source§

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

Attempts to retrieve an instance of Self from a reference to a Zval. Read more
Source§

fn try_from_zval(zval: &'a Zval) -> Result<Self>

Attempts to retrieve an instance of Self from a reference to a Zval, and tells why it failed. Read more
Source§

const NULLABLE: bool = false

Whether a PHP argument of this type accepts null and may be omitted. Read more
Source§

fn from_missing() -> Option<Self>

The value to use when a PHP argument of this type was omitted by the caller. None means the argument is required. Read more

Auto Trait Implementations§

§

impl<'a, T> !RefUnwindSafe for ClassRefMut<'a, T>

§

impl<'a, T> !Send for ClassRefMut<'a, T>

§

impl<'a, T> !Sync for ClassRefMut<'a, T>

§

impl<'a, T> !UnwindSafe for ClassRefMut<'a, T>

§

impl<'a, T> Forget for ClassRefMut<'a, T>

§

impl<'a, T> Freeze for ClassRefMut<'a, T>

§

impl<'a, T> Move for ClassRefMut<'a, T>

§

impl<'a, T> Unpin for ClassRefMut<'a, T>
where *const T is !null: Unpin, &'a Cell<isize>: Unpin, &'a mut T: Unpin,

§

impl<'a, T> UnsafeUnpin for ClassRefMut<'a, T>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<'a, T> FromZendObjectMut<'a> for T
where T: FromZendObject<'a>,

Source§

fn from_zend_object_mut(obj: &'a mut _zend_object) -> Result<T, Error>

Extracts Self from the source ZendObject. Read more
Source§

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

Source§

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

The corresponding type of the implemented value in PHP.
Source§

const NULLABLE: bool = const NULLABLE: bool = <T as FromZval>::NULLABLE;

Whether a PHP argument of this type accepts null and may be omitted.
Source§

fn from_zval_mut(zval: &'a mut _zval_struct) -> Option<T>

Attempts to retrieve an instance of Self from a mutable reference to a Zval. Read more
Source§

fn from_missing() -> Option<T>

The value to use when a PHP argument of this type was omitted by the caller. None means the argument is required. Read more
Source§

fn try_from_zval_mut(zval: &'a mut _zval_struct) -> Result<T, Error>

Attempts to retrieve an instance of Self from a mutable reference to a Zval, and tells why it failed. Read more
Source§

const BY_REF: bool = false

Whether a PHP argument of this type is declared pass-by-reference (&$arg). Set it for types that mutate a PHP value in place, so the engine separates the value before the call.
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.