pub struct ZBox<T: ZBoxable>(/* private fields */);Expand description
A pointer type for heap allocation using the Zend memory manager.
See the module level documentation for more.
Implementations§
Source§impl<T: ZBoxable> ZBox<T>
impl<T: ZBoxable> ZBox<T>
Sourcepub fn into_raw(self) -> &'static mut T
pub fn into_raw(self) -> &'static mut T
Returns the pointer contained by the box, dropping the box in the process. The data pointed to by the returned pointer is not released.
§Safety
The caller is responsible for managing the memory pointed to by the returned pointer, including freeing the memory.
Trait Implementations§
Source§impl<T: RegisteredClass + Clone> Clone for ZBox<ZendClassObject<T>>
impl<T: RegisteredClass + Clone> Clone for ZBox<ZendClassObject<T>>
Source§impl Clone for ZBox<ZendHashTable>
impl Clone for ZBox<ZendHashTable>
Source§impl<T: RegisteredClass + Default> Default for ZBox<ZendClassObject<T>>
impl<T: RegisteredClass + Default> Default for ZBox<ZendClassObject<T>>
Source§impl Default for ZBox<ZendHashTable>
impl Default for ZBox<ZendHashTable>
Source§impl<T: RegisteredClass> From<ZBox<ZendClassObject<T>>> for ZBox<ZendObject>
impl<T: RegisteredClass> From<ZBox<ZendClassObject<T>>> for ZBox<ZendObject>
Source§fn from(obj: ZBox<ZendClassObject<T>>) -> Self
fn from(obj: ZBox<ZendClassObject<T>>) -> Self
Converts to this type from the input type.
Source§impl<'a> FromIterator<(&'a str, _zval_struct)> for ZBox<ZendHashTable>
impl<'a> FromIterator<(&'a str, _zval_struct)> for ZBox<ZendHashTable>
Source§impl FromIterator<(i64, _zval_struct)> for ZBox<ZendHashTable>
impl FromIterator<(i64, _zval_struct)> for ZBox<ZendHashTable>
Source§impl FromIterator<_zval_struct> for ZBox<ZendHashTable>
impl FromIterator<_zval_struct> for ZBox<ZendHashTable>
Source§impl<T: RegisteredClass> IntoZval for ZBox<ZendClassObject<T>>
impl<T: RegisteredClass> IntoZval for ZBox<ZendClassObject<T>>
Source§impl IntoZval for ZBox<ZendHashTable>
impl IntoZval for ZBox<ZendHashTable>
Source§impl IntoZval for ZBox<ZendObject>
impl IntoZval for ZBox<ZendObject>
Source§impl<V, H> TryFrom<HashSet<V, H>> for ZBox<ZendHashTable>where
V: IntoZval,
H: BuildHasher,
impl<V, H> TryFrom<HashSet<V, H>> for ZBox<ZendHashTable>where
V: IntoZval,
H: BuildHasher,
Auto Trait Implementations§
impl<T> Freeze for ZBox<T>
impl<T> RefUnwindSafe for ZBox<T>where
T: RefUnwindSafe,
impl<T> !Send for ZBox<T>
impl<T> !Sync for ZBox<T>
impl<T> Unpin for ZBox<T>
impl<T> UnwindSafe for ZBox<T>where
T: RefUnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoZvalDyn for T
impl<T> IntoZvalDyn for T
Source§fn as_zval(&self, persistent: bool) -> Result<_zval_struct, Error>
fn as_zval(&self, persistent: bool) -> Result<_zval_struct, Error>
Converts a Rust primitive type into a Zval. Returns a result containing
the Zval if successful.
self is cloned before being converted into
a zval. Read moreSource§fn stub_value(&self) -> String
fn stub_value(&self) -> String
Returns the PHP stub representation of this value. Read more