Struct edge_schema::schema::EntityMeta
source · pub struct EntityMeta {
pub uid: Option<Uuid>,
pub name: String,
pub description: Option<String>,
pub labels: HashMap<String, String>,
pub annotations: HashMap<String, Value>,
pub parent: Option<EntityUri>,
}
Expand description
Common entity metadata.
This data is not generic, and is the same for all entity kinds.
Fields§
§uid: Option<Uuid>
Optional unique id.
name: String
Name of the entity.
This is only unique within the scope of the entity.
description: Option<String>
Long description.
Should be either plain text or markdown.
labels: HashMap<String, String>
Labels are used to organize entities. They are a set of simple key/value pairs.
annotations: HashMap<String, Value>
Annotations are used to attach arbitrary metadata to entities. They can contain arbitrary (json-encodable) data.
parent: Option<EntityUri>
Implementations§
Trait Implementations§
source§impl Clone for EntityMeta
impl Clone for EntityMeta
source§fn clone(&self) -> EntityMeta
fn clone(&self) -> EntityMeta
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for EntityMeta
impl Debug for EntityMeta
source§impl<'de> Deserialize<'de> for EntityMeta
impl<'de> Deserialize<'de> for EntityMeta
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl JsonSchema for EntityMeta
impl JsonSchema for EntityMeta
source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moresource§impl PartialEq for EntityMeta
impl PartialEq for EntityMeta
source§fn eq(&self, other: &EntityMeta) -> bool
fn eq(&self, other: &EntityMeta) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for EntityMeta
impl Serialize for EntityMeta
impl Eq for EntityMeta
impl StructuralPartialEq for EntityMeta
Auto Trait Implementations§
impl Freeze for EntityMeta
impl RefUnwindSafe for EntityMeta
impl Send for EntityMeta
impl Sync for EntityMeta
impl Unpin for EntityMeta
impl UnwindSafe for EntityMeta
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.