Returns the value of the zval if it is a long.
Returns the value of the zval if it is a bool.
Returns the value of the zval if it is a double.
Returns the value of the zval if it is a string.
If the zval does not contain a string, the function will check if it contains a
double or a long, and if so it will convert the value to a String
and return it.
Don’t rely on this logic, as there is potential for this to change to match the output
of the str()
function.
Returns the value of the zval if it is a string.
Note that this functions output will not be the same as string()
, as
this function does not attempt to convert other types into a String
, as it could not
pass back a &str
in those cases.
Returns the value of the zval if it is a string and can be unpacked into a vector of a
given type. Similar to the unpack
in PHP, except you can only unpack one type.
There is no way to tell if the data stored in the string is actually of the given type.
The results of this function can also differ from platform-to-platform due to the different
representation of some types on different platforms. Consult the pack
function
documentation for more details.
Returns the value of the zval if it is a resource.
Returns the value of the zval if it is an array.
Returns the value of the zval if it is an object.
Returns the value of the zval if it is a reference.
Returns the value of the zval if it is callable.
Attempts to call the zval as a callable with a list of arguments to pass to the function.
Note that a thrown exception inside the callable is not detectable, therefore you should
check if the return value is valid rather than unwrapping. Returns a result containing the
return value of the function, or an error.
You should not call this function directly, rather through the call_user_func
macro.
params
- A list of parameters to call the function with.
Returns the type of the Zval.
Returns true if the zval is a long, false otherwise.
Returns true if the zval is null, false otherwise.
Returns true if the zval is true, false otherwise.
Returns true if the zval is false, false otherwise.
Returns true if the zval is a bool, false otherwise.
Returns true if the zval is a double, false otherwise.
Returns true if the zval is a string, false otherwise.
Returns true if the zval is a resource, false otherwise.
Returns true if the zval is an array, false otherwise.
Returns true if the zval is an object, false otherwise.
Returns true if the zval is a reference, false otherwise.
Returns true if the zval is callable, false otherwise.
Sets the value of the zval as a string. Returns nothing in a result when successful.
val
- The value to set the zval as.
persistent
- Whether the string should persist between requests.
Sets the value of the zval as a binary string, which is represented in Rust as a vector.
val
- The value to set the zval as.
Sets the value of the zval as a interned string. Returns nothing in a result when successful.
val
- The value to set the zval as.
Sets the value of the zval as a long.
val
- The value to set the zval as.
Sets the value of the zval as a double.
val
- The value to set the zval as.
Sets the value of the zval as a boolean.
val
- The value to set the zval as.
Sets the value of the zval as null.
This is the default of a zval.
Sets the value of the zval as a resource.
val
- The value to set the zval as.
Sets the value of the zval as a reference to an object.
val
- The value to set the zval as.
Sets the value of the zval as an array. Returns nothng in a result on success.
val
- The value to set the zval as.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
impl<T> Any for T where
T: 'static + ?Sized,
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
impl<T, U> Into<U> for T where
U: From<T>,
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.