Struct ext_php_rs::ffi::zend_type
source · #[repr(C)]pub struct zend_type {
pub ptr: *mut c_void,
pub type_mask: u32,
}
Fields§
§ptr: *mut c_void
§type_mask: u32
Implementations§
source§impl 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§
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