pub trait Resolve<S>:
Clone
+ Send
+ Sync
+ Sized
+ 'static {
// Required methods
fn dependencies(into: &mut Vec<TypeId>);
fn resolve(registry: &Registry<S>) -> Result<Self>;
}Expand description
The dependencies a component declares through Component::Deps.
A dependency is a hard requirement: the component cannot boot or run
without it. Arc<T> requires T to be registered and, when T is itself
a component, orders it before the dependent. Option<Arc<T>> takes the
same ordering when T is present and resolves to None when it is not.
Tuples combine up to eight dependencies; () declares none.
A component that merely uses another when it happens to be there, and
serves without it, does not declare it here. It resolves the value at the
point of use and expresses a preferred start order through run_priority.
Resolution happens once before Bootable::boot and once before each run
generation, in the registry, after every dependency has had its chance to
be registered. A missing dependency is one error naming the component and
the missing type.
Required Methods§
Sourcefn dependencies(into: &mut Vec<TypeId>)
fn dependencies(into: &mut Vec<TypeId>)
The types this value requires. The registry turns registered components among them into ordering edges.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".