Struct ext_php_rs::ffi::zend_type
source · [−]Fields
ptr: *mut c_void
type_mask: u32
Implementations
sourceimpl zend_type
impl zend_type
sourcepub fn empty(pass_by_ref: bool, is_variadic: bool) -> Self
pub fn empty(pass_by_ref: bool, is_variadic: bool) -> Self
Builds an empty Zend type container.
Parameters
pass_by_ref
- Whether the value should be passed by reference.is_variadic
- Whether this type represents a variadic argument.
sourcepub fn empty_from_type(
type_: DataType,
pass_by_ref: bool,
is_variadic: bool,
allow_null: bool
) -> Option<Self>
pub fn empty_from_type(
type_: DataType,
pass_by_ref: bool,
is_variadic: bool,
allow_null: bool
) -> Option<Self>
Attempts to create a zend type for a given datatype. Returns an option containing the type.
Returns None
if the data type was a class object where the class
name could not be converted into a C string (i.e. contained
NUL-bytes).
Parameters
type_
- Data type to create zend type for.pass_by_ref
- Whether the type should be passed by reference.is_variadic
- Whether the type is for a variadic argument.allow_null
- Whether the type should allow null to be passed in place.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for zend_type
impl !Send for zend_type
impl !Sync for zend_type
impl Unpin for zend_type
impl UnwindSafe for zend_type
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> 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