pub trait PhpOnceClosure {
    fn into_closure(self) -> Closure;
}
Available 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§