Trait ext_php_rs::closure::PhpOnceClosure[][src]

pub trait PhpOnceClosure {
    fn into_closure(self) -> Closure;
}
This is supported on crate feature closure only.
Expand description

Implemented on FnOnce types which can be used as PHP closures. See Closure.

Internally, this trait should wrap the FnOnce closure inside a FnMut closure, and prevent the user from calling the closure more than once.

Required methods

Converts the Rust FnOnce closure into a FnMut closure, and then into a PHP closure.

Implementations on Foreign Types

Implementors