pub trait App {
// Required methods
fn infrastructure(&self) -> &dyn Infrastructure;
fn interface(&mut self) -> &mut dyn Interface;
}Expand description
An app: a ui tree and a swappable infra. The whole top level.
Named per suite member in the app’s own crate (KorpApp, NornirApp), because the
name is the app’s; this is the shape they share. A test or a robot driver holds
&mut dyn App instead of a struct private to a main.rs — which is not theoretical:
korp’s struct Korp being bin-private meant 29 integration test files each redeclared
their own copy and drove THAT, with one reference to the real shell in the whole
directory.
Required Methods§
Sourcefn infrastructure(&self) -> &dyn Infrastructure
fn infrastructure(&self) -> &dyn Infrastructure
The swappable half.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".