Struct ext_php_rs::boxed::ZBox
source · [−]pub struct ZBox<T: ZBoxable>(_);
Expand description
A pointer type for heap allocation using the Zend memory manager.
See the module level documentation for more.
Implementations
sourceimpl<T: ZBoxable> ZBox<T>
impl<T: ZBoxable> ZBox<T>
sourcepub unsafe fn from_raw(ptr: *mut T) -> Self
pub unsafe fn from_raw(ptr: *mut T) -> Self
Creates a new box from a given pointer.
Parameters
ptr
- A non-null, well-aligned pointer to aT
.
Safety
Caller must ensure that ptr
is non-null, well-aligned and pointing to
a 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
sourceimpl Clone for ZBox<ZendHashTable>
impl Clone for ZBox<ZendHashTable>
sourceimpl<T: RegisteredClass + Clone> Clone for ZBox<ZendClassObject<T>>
impl<T: RegisteredClass + Clone> Clone for ZBox<ZendClassObject<T>>
sourceimpl Default for ZBox<ZendHashTable>
impl Default for ZBox<ZendHashTable>
sourceimpl<T: RegisteredClass + Default> Default for ZBox<ZendClassObject<T>>
impl<T: RegisteredClass + Default> Default for ZBox<ZendClassObject<T>>
sourceimpl<T: RegisteredClass> From<ZBox<ZendClassObject<T>>> for ZBox<ZendObject>
impl<T: RegisteredClass> From<ZBox<ZendClassObject<T>>> for ZBox<ZendObject>
sourcefn from(obj: ZBox<ZendClassObject<T>>) -> Self
fn from(obj: ZBox<ZendClassObject<T>>) -> Self
Performs the conversion.
sourceimpl<'a> FromIterator<(&'a str, _zval_struct)> for ZBox<ZendHashTable>
impl<'a> FromIterator<(&'a str, _zval_struct)> for ZBox<ZendHashTable>
sourceimpl FromIterator<(u64, _zval_struct)> for ZBox<ZendHashTable>
impl FromIterator<(u64, _zval_struct)> for ZBox<ZendHashTable>
sourceimpl FromIterator<_zval_struct> for ZBox<ZendHashTable>
impl FromIterator<_zval_struct> for ZBox<ZendHashTable>
sourcefn from_iter<T: IntoIterator<Item = Zval>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = Zval>>(iter: T) -> Self
Creates a value from an iterator. Read more
sourceimpl IntoZval for ZBox<ZendHashTable>
impl IntoZval for ZBox<ZendHashTable>
sourceimpl<T: RegisteredClass> IntoZval for ZBox<ZendClassObject<T>>
impl<T: RegisteredClass> IntoZval for ZBox<ZendClassObject<T>>
sourceimpl IntoZval for ZBox<ZendObject>
impl IntoZval for ZBox<ZendObject>
sourceimpl<K, V> TryFrom<HashMap<K, V, RandomState>> for ZBox<ZendHashTable> where
K: AsRef<str>,
V: IntoZval,
impl<K, V> TryFrom<HashMap<K, V, RandomState>> for ZBox<ZendHashTable> where
K: AsRef<str>,
V: IntoZval,
Auto Trait Implementations
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> IntoZvalDyn for T where
T: IntoZval + Clone,
impl<T> IntoZvalDyn for T where
T: IntoZval + Clone,
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more