pub trait DynPhases {
// Required methods
fn dyn_build(&mut self, ctx: &mut RustdvCtx);
fn dyn_connect(&mut self, ctx: &mut RustdvCtx);
fn dyn_end_of_elaboration(&mut self, ctx: &mut RustdvCtx);
fn dyn_start_of_simulation(&mut self, ctx: &mut RustdvCtx);
fn dyn_run<'a>(
&'a mut self,
ctx: &'a mut RustdvCtx,
) -> Pin<Box<dyn Future<Output = Result<(), TestError>> + 'a>>;
fn dyn_extract(&mut self, ctx: &mut RustdvCtx);
fn dyn_check(&mut self, ctx: &mut RustdvCtx, errors: &mut CheckSink);
fn dyn_report(&mut self, ctx: &mut RustdvCtx);
fn dyn_final(&mut self, ctx: &mut RustdvCtx);
fn dyn_start(&mut self, ctx: &mut RustdvCtx);
}Expand description
Dyn-safe mirror of Component’s non-async phases (D48).
Component stopped being dyn-compatible the moment run became an
async fn, and ComponentNode needs a dyn-safe supertrait to walk a
tree of &mut dyn children. The blanket impl means users never write
this: they override the phases on Component, and the distinct method
names keep component.extract(..) unambiguous.
Required Methods§
fn dyn_build(&mut self, ctx: &mut RustdvCtx)
fn dyn_connect(&mut self, ctx: &mut RustdvCtx)
fn dyn_end_of_elaboration(&mut self, ctx: &mut RustdvCtx)
fn dyn_start_of_simulation(&mut self, ctx: &mut RustdvCtx)
Sourcefn dyn_run<'a>(
&'a mut self,
ctx: &'a mut RustdvCtx,
) -> Pin<Box<dyn Future<Output = Result<(), TestError>> + 'a>>
fn dyn_run<'a>( &'a mut self, ctx: &'a mut RustdvCtx, ) -> Pin<Box<dyn Future<Output = Result<(), TestError>> + 'a>>
The async run, boxed so it can be awaited behind dyn (D48). This
is the object-safe shim run_all needs to fire each component’s run.
fn dyn_extract(&mut self, ctx: &mut RustdvCtx)
fn dyn_check(&mut self, ctx: &mut RustdvCtx, errors: &mut CheckSink)
fn dyn_report(&mut self, ctx: &mut RustdvCtx)
fn dyn_final(&mut self, ctx: &mut RustdvCtx)
fn dyn_start(&mut self, ctx: &mut RustdvCtx)
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".