pub struct MemChangedNotice {
pub mem: String,
pub from_head: String,
pub to_head: String,
pub changes: NoticeChanges,
}Expand description
Non-blocking “the mem moved under you” notice, attached to a response only when a reload happened during the operation. The operation’s own result/error rides alongside — this is purely the objective “what else changed” delta, scaled by size, for the agent to judge relevance against (the engine does not filter to a per-agent interest model).
Built by MemChangedNotice::from_delta from the
from_head → to_head ChangeEnvelope list a reload produced.
Entries are ordered lexically by id so two notices over the same
delta are byte-identical.
Fields§
§mem: String§from_head: String§to_head: String§changes: NoticeChangesImplementations§
Source§impl MemChangedNotice
impl MemChangedNotice
Sourcepub fn from_delta(
mem: String,
from_head: String,
to_head: String,
changes: Vec<ChangeEnvelope>,
) -> Self
pub fn from_delta( mem: String, from_head: String, to_head: String, changes: Vec<ChangeEnvelope>, ) -> Self
Build a notice from the per-entity delta between from_head
and to_head, degrading by size:
detailed (≤ [NOTICE_DETAILED_MAX]) → ids
(≤ [NOTICE_IDS_MAX]) → counts. Entries are sorted lexically
by primary id (the to_id for a rename) so the output is
deterministic regardless of input order.
Sourcepub fn entity_count(&self) -> usize
pub fn entity_count(&self) -> usize
Total changed-entity count this notice describes, across every
degradation tier. The MCP layer uses it to populate the
entities_loaded field of a MemReloaded warning synthesised
for an error response — a mutation reloads inside the engine
and surfaces only the stashed notice, not a WarningHint, so the
error-text warning line is reconstructed from the notice itself.
Trait Implementations§
Source§impl Clone for MemChangedNotice
impl Clone for MemChangedNotice
Source§fn clone(&self) -> MemChangedNotice
fn clone(&self) -> MemChangedNotice
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 MemChangedNotice
impl Debug for MemChangedNotice
impl Eq for MemChangedNotice
Source§impl PartialEq for MemChangedNotice
impl PartialEq for MemChangedNotice
Source§impl Serialize for MemChangedNotice
impl Serialize for MemChangedNotice
impl StructuralPartialEq for MemChangedNotice
Auto Trait Implementations§
impl Freeze for MemChangedNotice
impl RefUnwindSafe for MemChangedNotice
impl Send for MemChangedNotice
impl Sync for MemChangedNotice
impl Unpin for MemChangedNotice
impl UnsafeUnpin for MemChangedNotice
impl UnwindSafe for MemChangedNotice
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
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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
key and return true if they are equal.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