pub enum Edit {
Create {
id: EntityId,
entity: Entity,
},
SetAttribute {
id: EntityId,
slot: usize,
value: Value,
},
Retype {
id: EntityId,
type_name: Arc<str>,
},
Remove {
id: EntityId,
},
}Expand description
One staged change.
Deliberately structural: there is no set_name or set_material here.
Domain-shaped authoring belongs in the crate that owns the domain, built
on top of these operations – otherwise every schema concept leaks into
the model layer, which is the boundary this crate exists to hold.
Variants§
Create
Create an entity under a reserved id.
Fields
§
id: EntityIdThe id reserved for it by Transaction::create.
SetAttribute
Replace one positional attribute.
Retype
Change an entity’s type name, keeping its id and attributes.
Remove
Delete an entity.
Trait Implementations§
impl StructuralPartialEq for Edit
Auto Trait Implementations§
impl Freeze for Edit
impl RefUnwindSafe for Edit
impl Send for Edit
impl Sync for Edit
impl Unpin for Edit
impl UnsafeUnpin for Edit
impl UnwindSafe for Edit
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