Trait serde_closure::traits::FnOnceBox
source · pub trait FnOnceBox<A> {
type Output;
fn call_once_box(self: Box<Self>, args: A) -> Self::Output;
}
Expand description
A version of the FnOnce
trait intended to be used for boxed trait
objects to make them callable on stable Rust.
ⓘ
let t: Box<dyn FnOnceBox(…) -> …> = …;
let output = t.call_once_box((…,));
Required Associated Types
Required Methods
sourcefn call_once_box(self: Box<Self>, args: A) -> Self::Output
fn call_once_box(self: Box<Self>, args: A) -> Self::Output
Performs the call operation on a Box<dyn FnOnceBox(…) -> …>
.