pub trait EntityDescriptorConst {
    type Spec: Serialize + DeserializeOwned + JsonSchema + Clone + PartialEq + Eq + Debug;
    type State: Serialize + DeserializeOwned + JsonSchema + Clone + PartialEq + Eq + Debug;

    const NAMESPACE: &'static str;
    const NAME: &'static str;
    const VERSION: &'static str;
    const KIND: &'static str;

    // Provided methods
    fn json_schema() -> RootSchema { ... }
    fn build_uri_str(name: &str) -> String { ... }
    fn build_uri(name: &str) -> Result<EntityUri, EntityUriParseError> { ... }
    fn type_name() -> String { ... }
    fn build_type_descriptor() -> Entity<EntityTypeSpec>
       where Self: JsonSchema + Sized { ... }
}
Expand description

A marker trait for entity types.

Should be implementes on the struct representing the entities spec.

Required Associated Types§

source

type Spec: Serialize + DeserializeOwned + JsonSchema + Clone + PartialEq + Eq + Debug

Entity specification.

source

type State: Serialize + DeserializeOwned + JsonSchema + Clone + PartialEq + Eq + Debug

The main entity state.

Required Associated Constants§

source

const NAMESPACE: &'static str

source

const NAME: &'static str

source

const VERSION: &'static str

source

const KIND: &'static str

Provided Methods§

source

fn json_schema() -> RootSchema

source

fn build_uri_str(name: &str) -> String

source

fn build_uri(name: &str) -> Result<EntityUri, EntityUriParseError>

source

fn type_name() -> String

Build the name that is used for the EntityTypeSpec representing this type.

source

fn build_type_descriptor() -> Entity<EntityTypeSpec>
where Self: JsonSchema + Sized,

Object Safety§

This trait is not object safe.

Implementors§

source§

impl EntityDescriptorConst for AppV1Spec

source§

const NAMESPACE: &'static str = "wasmer.io"

source§

const NAME: &'static str = "App"

source§

const VERSION: &'static str = "1-alpha1"

source§

const KIND: &'static str = "wasmer.io/App.v1"

§

type Spec = AppV1Spec

§

type State = AppStateV1

source§

impl EntityDescriptorConst for AppVersionV1Spec

source§

const NAMESPACE: &'static str = "wasmer.io"

source§

const NAME: &'static str = "AppVersion"

source§

const VERSION: &'static str = "1"

source§

const KIND: &'static str = "wasmer.io/AppVersion.v1"

§

type Spec = AppVersionV1Spec

§

type State = AppVersionV1State

source§

impl EntityDescriptorConst for CronJobSpecV1

source§

const NAMESPACE: &'static str = "wasmer.io"

source§

const NAME: &'static str = "CronJob"

source§

const VERSION: &'static str = "v1-alpha1"

source§

const KIND: &'static str = "wasmer.io/CronJob.v1-alpha1"

§

type Spec = CronJobSpecV1

§

type State = ()

source§

impl EntityDescriptorConst for DnsRecordSpecV1

source§

const NAMESPACE: &'static str = "wasmer.io"

source§

const NAME: &'static str = "DnsRecord"

source§

const VERSION: &'static str = "v1"

source§

const KIND: &'static str = "wasmer.io/DnsRecord.v1"

§

type Spec = DnsRecordSpecV1

§

type State = ()

source§

impl EntityDescriptorConst for EntityTypeSpecV1

source§

const NAMESPACE: &'static str = "wasmer.io"

source§

const NAME: &'static str = "EntityType"

source§

const VERSION: &'static str = "1"

source§

const KIND: &'static str = "wasmer.io/EntityType.v1"

§

type Spec = EntityTypeSpecV1

§

type State = ()

source§

impl EntityDescriptorConst for HttpRouterSpecV1

source§

const NAMESPACE: &'static str = "wasmer.io"

source§

const NAME: &'static str = "HttpRouter"

source§

const VERSION: &'static str = "1alpha1"

source§

const KIND: &'static str = "wasmer.io/HttpRouter.v1alpha1"

§

type Spec = HttpRouterSpecV1

§

type State = ()

source§

impl EntityDescriptorConst for IpBlacklistEntrySpec

source§

const NAMESPACE: &'static str = "edge.io"

source§

const NAME: &'static str = "IpBlacklistEntry"

source§

const VERSION: &'static str = "1"

source§

const KIND: &'static str = "edge.io/IpBlacklistEntry.v1"

§

type Spec = IpBlacklistEntrySpec

§

type State = ()

source§

impl EntityDescriptorConst for JobSpecV1

source§

const NAMESPACE: &'static str = "wasmer.io"

source§

const NAME: &'static str = "JobResult"

source§

const VERSION: &'static str = "v1-alpha1"

source§

const KIND: &'static str = "wasmer.io/CronJob.v1-alpha1"

§

type Spec = JobSpecV1

§

type State = ()

source§

impl EntityDescriptorConst for WebcPackageVersionV1Alpha1Spec

source§

const NAMESPACE: &'static str = "wasmer.io"

source§

const NAME: &'static str = "PackageVersion"

source§

const VERSION: &'static str = "1alpha1"

source§

const KIND: &'static str = "wasmer.io/PackageVersion.v1alpha1"

§

type Spec = WebcPackageVersionV1Alpha1Spec

§

type State = ()