pub trait AsErasedContext {
// Required methods
fn as_erased_mut(&mut self) -> &mut dyn ErasedContext;
fn as_erased(&self) -> &dyn ErasedContext;
}Expand description
Annoyingly, we can’t generically handle &mut T where T: ErasedContext and also
&mut dyn ErasedContext without introducing this ugly trait.
TODO: Split up the execution context so that we handle memory and execution separately, since the memory is the only thing really stopping us from making this more ergonomic.
Required Methods§
Sourcefn as_erased_mut(&mut self) -> &mut dyn ErasedContext
fn as_erased_mut(&mut self) -> &mut dyn ErasedContext
Convert to a mutable type-erased context.
Sourcefn as_erased(&self) -> &dyn ErasedContext
fn as_erased(&self) -> &dyn ErasedContext
Convert to an immutable type-erased context.