Trait vm_resource::CanResolveTo
source · pub trait CanResolveTo<O>: ResourceKind {
type Input<'a>: Send;
}
Expand description
Trait specifying that a ResourceKind
can be resolved to a given output
type.
This should be implemented exactly once for each resource kind so that Rust’s type inference can determine the output type without callers having to be explicit.
This trait is separate from ResourceKind
so that it can be implemented
in a separate crate without violating Rust’s coherence (orphan) rules. This
is important because the type a resource resolves to is usually of no
interest to the client constructing the resource, so there is no need to
include the crate defining the output time in the client’s dependency graph.
Required Associated Types§
Object Safety§
This trait is not object safe.