Struct edge_schema::schema::EntityState
source · pub struct EntityState<S = ()> {
pub entity_version: u64,
pub parent_uid: Option<Uuid>,
pub created_at: OffsetDateTime,
pub updated_at: OffsetDateTime,
pub main: Option<EntityStateComponent<S>>,
pub components: HashMap<String, EntityStateComponent>,
}
Expand description
State of an entity.
Contains a main
state, which will be managed by the owning service that
manages the entity.
Additional services may inject their own state, which will be found in
Self::components
.
Fields§
§entity_version: u64
Version of the entity. All modifications to metadata or spec will increment this version.
parent_uid: Option<Uuid>
UUID of the parent entity. This is only set if the entity is a child of another entity.
created_at: OffsetDateTime
Creation timestamp.
updated_at: OffsetDateTime
Last update timestamp. Will be set on each metadata or spec change, but not on state changes.
main: Option<EntityStateComponent<S>>
The primary state of the entity, managed by the owning service.
components: HashMap<String, EntityStateComponent>
Additional entity states, managed by services other than the entity owners.
Trait Implementations§
source§impl<S: Clone> Clone for EntityState<S>
impl<S: Clone> Clone for EntityState<S>
source§fn clone(&self) -> EntityState<S>
fn clone(&self) -> EntityState<S>
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<S: Debug> Debug for EntityState<S>
impl<S: Debug> Debug for EntityState<S>
source§impl<'de, S> Deserialize<'de> for EntityState<S>where
S: Deserialize<'de>,
impl<'de, S> Deserialize<'de> for EntityState<S>where
S: Deserialize<'de>,
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<S: JsonSchema> JsonSchema for EntityState<S>
impl<S: JsonSchema> JsonSchema for EntityState<S>
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<S: PartialEq> PartialEq for EntityState<S>
impl<S: PartialEq> PartialEq for EntityState<S>
source§fn eq(&self, other: &EntityState<S>) -> bool
fn eq(&self, other: &EntityState<S>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<S> Serialize for EntityState<S>where
S: Serialize,
impl<S> Serialize for EntityState<S>where
S: Serialize,
impl<S: Eq> Eq for EntityState<S>
impl<S> StructuralPartialEq for EntityState<S>
Auto Trait Implementations§
impl<S> Freeze for EntityState<S>where
S: Freeze,
impl<S> RefUnwindSafe for EntityState<S>where
S: RefUnwindSafe,
impl<S> Send for EntityState<S>where
S: Send,
impl<S> Sync for EntityState<S>where
S: Sync,
impl<S> Unpin for EntityState<S>where
S: Unpin,
impl<S> UnwindSafe for EntityState<S>where
S: UnwindSafe,
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.