pub trait CallbackPolicy: Clone + 'static {
// Required methods
fn capture(ctx: &Ctx<'_>) -> Option<Self>
where Self: Sized;
fn enter<R>(
ctx: &Ctx<'_>,
policy: Option<&Self>,
f: impl FnOnce() -> R,
) -> R
where Self: Sized;
}Expand description
Ambient host state that a scheduled callback must run under.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".