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) -> *mut T
pub fn into_raw(self) -> *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.
Mirrors Box::into_raw: the pointer is non-null and well-aligned, and
the caller becomes responsible for releasing it, typically by passing it
back to ZBox::from_raw or to the engine.
Trait Implementations§
Source§impl Clone for ZBox<ZendHashTable>
impl Clone for ZBox<ZendHashTable>
Source§impl<T: RegisteredClass + Clone> Clone for ZBox<ZendClassObject<T>>
impl<T: RegisteredClass + Clone> Clone for ZBox<ZendClassObject<T>>
Source§impl Default for ZBox<ZendHashTable>
impl Default for ZBox<ZendHashTable>
Source§impl<T: RegisteredClass + Default> Default for ZBox<ZendClassObject<T>>
impl<T: RegisteredClass + Default> Default for ZBox<ZendClassObject<T>>
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 IntoZval for ZBox<ZendHashTable>
impl IntoZval 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<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,
Source§impl<'a, K, V, H> TryFrom<IndexMap<K, V, H>> for ZBox<ZendHashTable>
Available on crate feature indexmap only.
impl<'a, K, V, H> TryFrom<IndexMap<K, V, H>> for ZBox<ZendHashTable>
Available on crate feature
indexmap only.Source§impl<V, H> TryFrom<IndexSet<V, H>> for ZBox<ZendHashTable>where
V: IntoZval,
H: BuildHasher,
Available on crate feature indexmap only.
impl<V, H> TryFrom<IndexSet<V, H>> for ZBox<ZendHashTable>where
V: IntoZval,
H: BuildHasher,
Available on crate feature
indexmap only.Auto Trait Implementations§
impl<T> !Send for ZBox<T>
impl<T> !Sync for ZBox<T>
impl<T> Freeze for ZBox<T>
impl<T> RefUnwindSafe for ZBox<T>where
NonNull<T>: RefUnwindSafe,
impl<T> Unpin for ZBox<T>
impl<T> UnsafeUnpin for ZBox<T>where
NonNull<T>: UnsafeUnpin,
impl<T> UnwindSafe for ZBox<T>where
NonNull<T>: UnwindSafe,
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