Trait edge_schema::schema::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 Types§
sourcetype Spec: Serialize + DeserializeOwned + JsonSchema + Clone + PartialEq + Eq + Debug
type Spec: Serialize + DeserializeOwned + JsonSchema + Clone + PartialEq + Eq + Debug
Entity specification.
sourcetype State: Serialize + DeserializeOwned + JsonSchema + Clone + PartialEq + Eq + Debug
type State: Serialize + DeserializeOwned + JsonSchema + Clone + PartialEq + Eq + Debug
The main entity state.
Required Associated Constants§
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>
sourcefn type_name() -> String
fn type_name() -> String
Build the name that is used for the EntityTypeSpec representing this type.
fn build_type_descriptor() -> Entity<EntityTypeSpec>where
Self: JsonSchema + Sized,
Object Safety§
This trait is not object safe.