Type Alias ext_php_rs::zend::ZendType
source · pub type ZendType = zend_type;
Expand description
Internal Zend type.
Aliased Type§
struct ZendType {
pub ptr: *mut c_void,
pub type_mask: u32,
}
Fields§
§ptr: *mut c_void
§type_mask: u32
Implementations§
source§impl ZendType
impl ZendType
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.