Skip to main content

EntityDescriptorConst

Trait EntityDescriptorConst 

Source
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 Constants§

Source

const NAMESPACE: &'static str

Source

const NAME: &'static str

Source

const VERSION: &'static str

Source

const KIND: &'static str

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.

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,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

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"

Source§

type Spec = AppV1Spec

Source§

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"

Source§

type Spec = AppVersionV1Spec

Source§

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"

Source§

type Spec = CronJobSpecV1

Source§

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"

Source§

type Spec = DnsRecordSpecV1

Source§

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"

Source§

type Spec = EntityTypeSpecV1

Source§

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"

Source§

type Spec = HttpRouterSpecV1

Source§

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"

Source§

type Spec = IpBlacklistEntrySpec

Source§

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"

Source§

type Spec = JobSpecV1

Source§

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"

Source§

type Spec = WebcPackageVersionV1Alpha1Spec

Source§

type State = ()