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.
Converts the Rust FnOnce closure into a FnMut closure, and then
into a PHP closure.
impl<A, B, C, D, Ret> PhpOnceClosure for Box<dyn FnOnce(A, B, C, D) -> Ret> where
for<'a> A: FromZval<'a> + 'static,
for<'a> B: FromZval<'a> + 'static,
for<'a> C: FromZval<'a> + 'static,
for<'a> D: FromZval<'a> + 'static,
Ret: IntoZval + 'static,
impl<A, B, C, D, E, Ret> PhpOnceClosure for Box<dyn FnOnce(A, B, C, D, E) -> Ret> where
for<'a> A: FromZval<'a> + 'static,
for<'a> B: FromZval<'a> + 'static,
for<'a> C: FromZval<'a> + 'static,
for<'a> D: FromZval<'a> + 'static,
for<'a> E: FromZval<'a> + 'static,
Ret: IntoZval + 'static,
impl<A, B, C, D, E, F, Ret> PhpOnceClosure for Box<dyn FnOnce(A, B, C, D, E, F) -> Ret> where
for<'a> A: FromZval<'a> + 'static,
for<'a> B: FromZval<'a> + 'static,
for<'a> C: FromZval<'a> + 'static,
for<'a> D: FromZval<'a> + 'static,
for<'a> E: FromZval<'a> + 'static,
for<'a> F: FromZval<'a> + 'static,
Ret: IntoZval + 'static,
impl<A, B, C, D, E, F, G, Ret> PhpOnceClosure for Box<dyn FnOnce(A, B, C, D, E, F, G) -> Ret> where
for<'a> A: FromZval<'a> + 'static,
for<'a> B: FromZval<'a> + 'static,
for<'a> C: FromZval<'a> + 'static,
for<'a> D: FromZval<'a> + 'static,
for<'a> E: FromZval<'a> + 'static,
for<'a> F: FromZval<'a> + 'static,
for<'a> G: FromZval<'a> + 'static,
Ret: IntoZval + 'static,
impl<A, B, C, D, E, F, G, H, Ret> PhpOnceClosure for Box<dyn FnOnce(A, B, C, D, E, F, G, H) -> Ret> where
for<'a> A: FromZval<'a> + 'static,
for<'a> B: FromZval<'a> + 'static,
for<'a> C: FromZval<'a> + 'static,
for<'a> D: FromZval<'a> + 'static,
for<'a> E: FromZval<'a> + 'static,
for<'a> F: FromZval<'a> + 'static,
for<'a> G: FromZval<'a> + 'static,
for<'a> H: FromZval<'a> + 'static,
Ret: IntoZval + 'static,