pub struct CreateEntityArgs {
pub mem: String,
pub title: String,
pub entity_type: String,
pub sections: IndexMap<String, String>,
pub metadata: IndexMap<String, String>,
pub relations: Vec<RelateArg>,
pub anchors: Vec<AnchorInput>,
pub dry_run: bool,
}Expand description
Arguments for [Engine::create_entity].
Carries the target mem (routes to the right mount), the entity shape (title, type, sections, metadata), and nothing else. Caller identity (actor, client, note) goes through the standalone arguments so the same MCP-tool / CLI-direct shape works.
Fields§
§mem: String§title: String§entity_type: String§sections: IndexMap<String, String>§metadata: IndexMap<String, String>§relations: Vec<RelateArg>Inline relationships to wire as outgoing edges from the new
entity. Each entry’s to may name an absent target — the
engine auto-stubs it (mirrors full’s create + stub
creation on relate). Open-mode admissions surface as
WarningHint::UndeclaredRelationshipOpen in the outcome’s
warnings. Empty default — callers omit when no inline
edges are needed.
anchors: Vec<AnchorInput>Permissive anchors[] provenance records to attach to the new
entity — validated (crate::anchor::AnchorInput::validate) and,
when non-empty, written into the mem-branch anchors sidecar in the
SAME commit as the entity so the two land atomically. Empty (the
default) writes no sidecar and leaves behaviour byte-identical to a
pre-anchor create. A malformed element refuses the whole create with
[EngineError::InvalidAnchor] (INVALID_ANCHOR) — the entity is not
written. Not folded into _hash (sidecar lives under .memstead/).
dry_run: boolWhen true, validate and compute the prospective hash but
do not write to disk, mutate the store, create edges, or
commit. Outcome carries content_hash = the prospective
hash and commit_sha empty — wire-equivalent to full’s
CreateArgs.dry_run semantics.
Trait Implementations§
Source§impl Clone for CreateEntityArgs
impl Clone for CreateEntityArgs
Source§fn clone(&self) -> CreateEntityArgs
fn clone(&self) -> CreateEntityArgs
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for CreateEntityArgs
impl RefUnwindSafe for CreateEntityArgs
impl Send for CreateEntityArgs
impl Sync for CreateEntityArgs
impl Unpin for CreateEntityArgs
impl UnsafeUnpin for CreateEntityArgs
impl UnwindSafe for CreateEntityArgs
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