pub enum Edit {
Set(FieldName, Vec<Value>),
Add(FieldName, Value),
Remove(FieldName, Value),
RemoveForm(FieldName, Value),
RemoveFormIn {
field: FieldName,
value: Value,
language: Option<Tag>,
},
AddForm {
field: FieldName,
of: Option<Value>,
value: Value,
},
Delete,
Restore,
AddType(TypeName),
RemoveType(TypeName),
}Expand description
A change to an entity.
Variants§
Set(FieldName, Vec<Value>)
Makes these the field’s values, replacing those it has; without values, clears it.
Add(FieldName, Value)
Adds a value to the field. A second value of a field with one value competes with the first until a person chooses, as a claim against another.
Remove(FieldName, Value)
Removes the values of the field that this one names, in any of their forms, with every form they have.
RemoveForm(FieldName, Value)
Removes the forms of the field’s values that equal this one, and keeps the values’ other forms.
RemoveFormIn
Removes the forms of the field’s values that equal this one and are in this language, or in none, and keeps the values’ other forms, as those that say the same in another language.
Fields
AddForm
Adds another form of a value that the field shows, in another language or script,
with the value’s valid time: of the value of, in any of its forms, or, without
it, of the only value the field shows.
Fields
Delete
Deletes the entity: hides it and keeps it, until it is restored.
Restore
Restores a deleted entity.
AddType(TypeName)
Gives the entity another type, which it may have already: types combine, as a photo is a file too.
RemoveType(TypeName)
Takes a type away from the entity, which keeps at least one; its values stay, as values of fields that no type of it defines.
Trait Implementations§
impl Eq for Edit
impl StructuralPartialEq for Edit
Auto Trait Implementations§
impl Forget for Edit
impl Freeze for Edit
impl Move 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.