pub struct UpdateResult {
pub id: EntityId,
pub title: String,
pub modified_sections: ModifiedSections,
pub modified_metadata: ModifiedMetadata,
pub modified_date: String,
pub content_hash: String,
pub prospective_hash: Option<String>,
pub commit_sha: String,
pub warnings: Vec<WarningHint>,
}Expand description
Result of an update operation.
Fields§
§id: EntityId§title: String§modified_sections: ModifiedSectionsSection-level mutations grouped by mode. Replaces the former flat
modified_fields: Vec<String> (which leaked mode as a string
prefix and collided on bare keys with modified_metadata).
modified_metadata: ModifiedMetadataMetadata-level mutations grouped by direction (set vs unset).
modified_date: String§content_hash: StringOn a real (non-dry-run) update: the new on-disk content hash after
the write. On a dry-run: the current on-disk hash (unchanged) —
the value an agent passes back as expected_hash on the follow-up
real call. Pair with prospective_hash to predict the post-write
hash without a second read. Wire key _hash.
prospective_hash: Option<String>Dry-run only: the hash the entity would have after the proposed
write. None on real (non-dry-run) updates. Lets agents preview a
change and then call the real update with expected_hash = content_hash (pinning the disk state) while still knowing what the
post-write hash will look like. Additive optional field — stable
shape for callers that ignore it.
commit_sha: StringPer-mem commit SHA produced by this mutation. Agents remember it
and feed it to memstead_changes_since to pick up incremental updates.
Empty for dry runs (no commit happens).
warnings: Vec<WarningHint>Typed non-fatal issues — same shape as CreateResult::warnings.
Pre-Bug-4 this was Vec<String> and unused; now carries
WarningHint so e.g. INLINE_WIKI_LINK_AUTO_STUBBED from update
flows out via the same {code, message, details} envelope agents
already branch on for create-time warnings.
Trait Implementations§
Source§impl Clone for UpdateResult
impl Clone for UpdateResult
Source§fn clone(&self) -> UpdateResult
fn clone(&self) -> UpdateResult
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for UpdateResult
impl Debug for UpdateResult
Source§impl Serialize for UpdateResult
impl Serialize for UpdateResult
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for UpdateResult
impl RefUnwindSafe for UpdateResult
impl Send for UpdateResult
impl Sync for UpdateResult
impl Unpin for UpdateResult
impl UnsafeUnpin for UpdateResult
impl UnwindSafe for UpdateResult
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> Fruit for T
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>
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>
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