pub struct CreateEntityOutcome {
pub id: EntityId,
pub title: String,
pub mem: String,
pub file_path: String,
pub content_hash: String,
pub commit_sha: String,
pub created_date: String,
pub warnings: Vec<WarningHint>,
pub type_guidance: BTreeMap<String, Vec<String>>,
pub incoming_count: Option<usize>,
pub incoming: Vec<IncomingRef>,
pub relations_declared: Vec<RelationDeclared>,
}Expand description
Successful outcome of [Engine::create_entity].
Fields§
§id: EntityId§title: StringEchoed from the request — full’s CreateResult.title carries
the same value so wire callers don’t need to derive it from
the id.
mem: StringEchoed from the request — full’s CreateResult.mem. The
EntityId.mem() accessor projects the same value, but
surfacing it explicitly mirrors full’s wire shape.
file_path: StringMem-relative path of the freshly-written .md file.
content_hash: StringSHA-256 of the canonical bytes. Round-trips as
expected_hash for the next mutation against this entity.
The wire
key is _hash to match memstead_entity’s read envelope and
the underscore-prefix convention for engine metadata. Pre-
fix mutation responses serialised this as content_hash,
forcing agents to rename the field when piping the value
into a follow-up call.
commit_sha: StringPer-mem commit identifier returned by the backend’s
crate::backend::MemBackend::commit. Wire-equivalent to
full’s CreateResult.commit_sha.
created_date: StringISO date string from the parsed entity’s created_date
metadata. Today’s date when the schema’s auto-stamp filled
it in; the existing value when re-materialising a stub with
init_timestamp semantics. Wire-equivalent to full’s
CreateResult.created_date.
warnings: Vec<WarningHint>Typed Tier-2 warnings — today
WarningHint::MissingRequiredSection for empty / absent
required sections. Populated even when the create succeeded
so callers see the same self-correction prompts the existing
engines emit. Wire-equivalent to full’s
CreateResult.warnings.
type_guidance: BTreeMap<String, Vec<String>>Type-level write_rules keyed by entity_type — the
MISSING_REQUIRED_SECTION / MISSING_REQUIRED_FIELD warnings
reference this top-level map via their entity_type field
rather than each carrying the (identical, type-axis) array.
Empty when no such warnings fire; stable empty shape ships
on the wire so consumers don’t branch on field presence
(F9). Sorted by key for deterministic output.
incoming_count: Option<usize>Number of incoming edges adopted from a pre-existing stub
at this id. None when no stub adoption happened (no
pre-existing entity, or a real entity at the id — but that
path errors with AlreadyExists before this field is
computed). Wire-equivalent to full’s
CreateResult.incoming_count.
incoming: Vec<IncomingRef>Incoming edges present at this id post-create — populated
from store.incoming(id) after the parse + upsert. Empty
when no pre-existing stub had referrers. Wire-equivalent to
full’s CreateResult.incoming.
relations_declared: Vec<RelationDeclared>Batched relation declarations from the request’s existing
relations[] parameter. Mirrors
UpdateEntityOutcome::relations_declared so the agent sees
one wire shape across memstead_create and memstead_update. Empty
[] when no relations were declared. target_was_stubbed
reports the same flag the existing relate auto-stub path
emits via WarningHint::InlineWikiLinkAutoStubbed.
Trait Implementations§
Source§impl Clone for CreateEntityOutcome
impl Clone for CreateEntityOutcome
Source§fn clone(&self) -> CreateEntityOutcome
fn clone(&self) -> CreateEntityOutcome
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 CreateEntityOutcome
impl Debug for CreateEntityOutcome
Auto Trait Implementations§
impl Freeze for CreateEntityOutcome
impl RefUnwindSafe for CreateEntityOutcome
impl Send for CreateEntityOutcome
impl Sync for CreateEntityOutcome
impl Unpin for CreateEntityOutcome
impl UnsafeUnpin for CreateEntityOutcome
impl UnwindSafe for CreateEntityOutcome
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