pub enum Effect {
Read,
ProcessState,
RepositoryMutation,
}Expand description
What running a capability changes outside the caller.
Classified, never declared: it follows from the kind, which is the field a declaration already carries. A projection reads this to decide whether to ask before running something — the Cockpit’s confirmation is derived from it — instead of naming capabilities it must treat carefully, which is a list that goes stale the day after it is written.
Variants§
Read
Nothing changes. Every query and every resource of this executable.
ProcessState
This process’s own memory changes, and nothing outside it.
RepositoryMutation
The repository changes.
For most of this executable’s life nothing classified to this, because no capability
of any kind wrote to the repository. That day arrived with ADR 0040: development
semantics are capabilities of this runtime, and the first of them — plan.transition
— stamps a field into an issue’s own tracked record. The variant was put on the model
in advance so that when one did, it would say so here, where a projection already
reads it and a client already asks before running it, rather than in whichever page
happens to render its button.
It is not classified from the kind, because the kind cannot know it: a command that
announces a peer and a command that writes a tracked file are the same kind. A
handler that writes the repository says so with
ExecutionPolicy::writes_repository, the way one that stops says so with
ExecutionPolicy::stoppable.
Trait Implementations§
impl Copy for Effect
Source§impl<'de> Deserialize<'de> for Effect
impl<'de> Deserialize<'de> for Effect
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Effect
Source§impl JsonSchema for Effect
impl JsonSchema for Effect
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl Ord for Effect
impl Ord for Effect
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for Effect
impl PartialOrd for Effect
impl StructuralPartialEq for Effect
Auto Trait Implementations§
impl Freeze for Effect
impl RefUnwindSafe for Effect
impl Send for Effect
impl Sync for Effect
impl Unpin for Effect
impl UnsafeUnpin for Effect
impl UnwindSafe for Effect
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,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§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
key and return true if they are equal.