pub trait ReplaceContext<C: Context>: View {
type Target: View<Context = C>;
// Required method
async fn with_context(
&mut self,
ctx: impl FnOnce(&Self::Context) -> C + Clone,
) -> Self::Target;
}
Expand description
A view which can have its context replaced.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.