pub enum WriteAction {
Create,
Update,
Delete,
}Expand description
What kind of write this is, carried alongside the diff rather than inferred from it.
plan/policy.md deliberately leaves “what a delete means” unsettled: a
diff that happens to remove every path is not the same as an explicit
signal that this is a deletion, and different evaluators may want
different logic for one. This crate takes no position on that meaning —
it only makes the action routable, so a policy can declare that it
applies to deletes, or does not, and an evaluator can see which case it
is looking at.
Variants§
Create
The record did not exist before this write.
Update
The record existed and this write changes it.
Delete
This write removes the record.
Implementations§
Trait Implementations§
Source§impl Clone for WriteAction
impl Clone for WriteAction
Source§fn clone(&self) -> WriteAction
fn clone(&self) -> WriteAction
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WriteAction
impl Debug for WriteAction
Source§impl Hash for WriteAction
impl Hash for WriteAction
Source§impl PartialEq for WriteAction
impl PartialEq for WriteAction
Source§fn eq(&self, other: &WriteAction) -> bool
fn eq(&self, other: &WriteAction) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for WriteAction
impl Eq for WriteAction
impl StructuralPartialEq for WriteAction
Auto Trait Implementations§
impl Freeze for WriteAction
impl RefUnwindSafe for WriteAction
impl Send for WriteAction
impl Sync for WriteAction
impl Unpin for WriteAction
impl UnsafeUnpin for WriteAction
impl UnwindSafe for WriteAction
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.