Enum NoAction
pub enum NoAction {}Expand description
The edits of a resource whose document holds nothing. An app whose data lives entirely outside any document — credentials in this device’s encrypted vault, a device’s hardware — publishes that data as live rows and effects, and its resource is only the door they are published on. No value exists, so nothing is ever applied, undone or synced.
Trait Implementations§
§impl Action for NoAction
impl Action for NoAction
§fn apply(&self, _doc: &mut AutoCommit) -> Result<(), ActionError>
fn apply(&self, _doc: &mut AutoCommit) -> Result<(), ActionError>
Apply this action’s mutation to
doc. See the trait contract. Read more§fn locus(&self) -> ExecutionLocus
fn locus(&self) -> ExecutionLocus
Where this action prefers to run. Defaults to
ExecutionLocus::ClientLocal.§fn risk(&self) -> RiskLevel
fn risk(&self) -> RiskLevel
The consequence class of this particular value — what it would do,
not what its type can do. A generic edit action classifies each value
(deleting a clip is
Destructive,
trimming one is not), and the host asks for the same confirmation a
declared destructive action gets whenever
requires_confirmation
holds. Must be a pure function of self. Defaults to
Low.§fn inverse_before(&self, doc: &AutoCommit) -> Option<Self>where
Self: Sized,
fn inverse_before(&self, doc: &AutoCommit) -> Option<Self>where
Self: Sized,
The document action that undoes this one when
apply records an
outside consequence in the document (an outbox entry, a filesystem op
queue). Computed against the document before this action runs, so a
delete can still read the row it removes. Read more§fn inverse_encoded(&self, doc: &AutoCommit) -> Option<EncodedAction>
fn inverse_encoded(&self, doc: &AutoCommit) -> Option<EncodedAction>
inverse_before as an encoded action, so the
door can undo through apply after the concrete type has been erased. Read more§fn change_kind(&self) -> ChangeKind
fn change_kind(&self) -> ChangeKind
Whether this value changes the document’s content or is housekeeping
about it (a read marker, a reading position). The executor writes it
into the change’s
ActionContext, where a
workspace activity feed reads it. Must be a pure function of self.
Defaults to Content.§fn action_kind(&self) -> ActionKind
fn action_kind(&self) -> ActionKind
§fn incoming_message(&self) -> bool
fn incoming_message(&self) -> bool
Whether this value records a message someone received (a chat post,
a delivered mail). The executor marks its change with
INCOMING_MESSAGE_FACET. Must be a
pure function of self.§fn describe(&self, doc: &AutoCommit) -> Option<Described>
fn describe(&self, doc: &AutoCommit) -> Option<Described>
What this value does and to which item, as history records it: a
field edit with its values before and after, a verb with its plain
arguments, or a group of those. Read from
doc as it is before the
value applies, on the origin only; replicas replay it with the
change. None lets the executor describe the value as the verb its
encoded form names (crate::Described::from_encoded).§impl<'de> Deserialize<'de> for NoAction
impl<'de> Deserialize<'de> for NoAction
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<NoAction, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<NoAction, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl Serialize for NoAction
impl Serialize for NoAction
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for NoAction
Auto Trait Implementations§
impl Freeze for NoAction
impl RefUnwindSafe for NoAction
impl Send for NoAction
impl Sync for NoAction
impl Unpin for NoAction
impl UnsafeUnpin for NoAction
impl UnwindSafe for NoAction
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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
Converts
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>
Converts
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