Skip to main content

Callables

Trait Callables 

Source
pub trait Callables {
    // Required methods
    fn is_callable(&self, callable: &Value) -> bool;
    fn call(&mut self, callable: &Value, value: &[u8]) -> Value;
}
Expand description

The PHP callables FILTER_CALLBACK can call, named by its "options" entry.

Required Methods§

Source

fn is_callable(&self, callable: &Value) -> bool

zend_is_callable(): whether the entry names a callable.

Source

fn call(&mut self, callable: &Value, value: &[u8]) -> Value

Calls the callable with the value converted to a string and returns its result.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§