pub trait ResourceKind:
'static
+ Send
+ Sync {
const NAME: &'static str;
}
Expand description
Trait implemented by resource kinds.
A resource kind defines a family of interchangeable resource types, where each resource type can be resolved to the same output type.
The output type is specified in the CanResolveTo
trait.
Typically this trait will be implemented on an uninhabited tag type, e.g.
enum DiskKind {}
trait Disk {};
impl vm_resource::ResourceKind for DiskKind {
const NAME: &'static str = "disk";
}
Required Associated Constants§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.