Trait vm_resource::ResourceId

source ·
pub trait ResourceId<K> {
    const ID: &'static str;
}
Expand description

A trait identifying a resource type’s ID (within a given ResourceKind).

enum DiskKind {}

#[derive(mesh::MeshPayload)]
struct FileDiskConfig {
    path: String,
}

impl vm_resource::ResourceId<DiskKind> for FileDiskConfig {
    const ID: &'static str = "file";
}

Required Associated Constants§

source

const ID: &'static str

The ID of this resource type.

This must be unique amongst resource types of this kind. It does not need to be unique between types of different resource kinds.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<K: ResourceKind> ResourceId<K> for PlatformResource

source§

const ID: &'static str = "platform"