pub struct EntityPatch {
pub name: Option<String>,
pub description: Option<Option<String>>,
pub properties: Option<Value>,
pub tags: Option<Vec<String>>,
pub entity_type: Option<Option<String>>,
}Expand description
Patch for update_entity. Only Some(_) fields are applied; None means “leave unchanged”.
For description:
None(outer) — leave the current description as-isSome(None)— clear the description (set to NULL)Some(Some(s))— set the description tos
For properties (deep-merge semantics):
None— leave properties as-isSome(value)— deep-mergevalueinto existing properties. Keys present in the patch overwrite existing keys; keys absent from the patch are preserved. Removing a key requires explicit replacement of the parent object (or a futureunset/null-markerextension).
For tags — replace semantics: Some(vec) sets tags to exactly vec. To add
a tag without losing existing tags, read the entity first, push the new tag,
and pass the full list back.
For entity_type — ADR-014 tri-state: None leaves the current type
unchanged, Some(None) explicitly clears it, and Some(Some(value))
validates and normalizes value through the installed entity-type
registry.
Fields§
§name: Option<String>§description: Option<Option<String>>§properties: Option<Value>§entity_type: Option<Option<String>>Trait Implementations§
Source§impl Clone for EntityPatch
impl Clone for EntityPatch
Source§impl Debug for EntityPatch
impl Debug for EntityPatch
Auto Trait Implementations§
impl Freeze for EntityPatch
impl RefUnwindSafe for EntityPatch
impl Send for EntityPatch
impl Sync for EntityPatch
impl Unpin for EntityPatch
impl UnsafeUnpin for EntityPatch
impl UnwindSafe for EntityPatch
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more