pub enum TextAssistancePrefsAction {
FieldEdit(Edit<TextAssistancePrefs>),
}Expand description
The replayable actions of TextAssistancePrefs, one per #[action] method.
Variants§
FieldEdit(Edit<TextAssistancePrefs>)
A field edit: a path into the record and an operation.
Trait Implementations§
Source§impl Clone for TextAssistancePrefsAction
impl Clone for TextAssistancePrefsAction
Source§impl Debug for TextAssistancePrefsAction
impl Debug for TextAssistancePrefsAction
Source§impl<'de> Deserialize<'de> for TextAssistancePrefsAction
impl<'de> Deserialize<'de> for TextAssistancePrefsAction
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl Operation for TextAssistancePrefsAction
impl Operation for TextAssistancePrefsAction
Source§const KIND: &'static str = "settings.text-assistance"
const KIND: &'static str = "settings.text-assistance"
The resource kind the record is published as.
type Record = TextAssistancePrefs
Source§fn edit(&self) -> Option<&Edit<TextAssistancePrefs>>
fn edit(&self) -> Option<&Edit<TextAssistancePrefs>>
The field edit this operation is, when it is one: it applies at its
path instead of through
Self::perform.Source§fn kind(&self) -> ActionKind
fn kind(&self) -> ActionKind
What this operation can do.
#[resource] derives it from each
verb’s signature.Source§fn field_edit(edit: Edit<TextAssistancePrefs>) -> Option<Self>
fn field_edit(edit: Edit<TextAssistancePrefs>) -> Option<Self>
The field edit
edit as an operation of the record.Source§fn perform(
&self,
_record: &mut TextAssistancePrefs,
_cx: &mut ActionCx,
) -> Result<(), Refusal>
fn perform( &self, _record: &mut TextAssistancePrefs, _cx: &mut ActionCx, ) -> Result<(), Refusal>
Run the operation’s method on the record.
Source§fn snapshot(record: &TextAssistancePrefs) -> Option<TextAssistancePrefs>
fn snapshot(record: &TextAssistancePrefs) -> Option<TextAssistancePrefs>
A copy of
record, so the next action can start from it rather than
read the whole record from the document again. #[resource]
generates it for a Clone record; without one (the default) every
action reads the record whole.Source§fn risk(&self) -> RiskLevel
fn risk(&self) -> RiskLevel
The consequence class of this operation.
#[resource] generates it
from #[action(destructive)], so the
same method reached through the generic apply action is confirmed
exactly as its named declaration is.Source§fn writes(&self) -> Writes
fn writes(&self) -> Writes
The units this operation may write beside the record unit (see
crate::footprint). #[resource] generates it: an item verb its
item, #[action(writes = field)] the fields named.Source§fn change_kind(&self) -> ChangeKind
fn change_kind(&self) -> ChangeKind
What the operation is to the people sharing the record: content,
housekeeping about it, or content from outside that is nobody’s undo
step.
#[resource] generates it from #[action(housekeeping)] and
#[action(external)].Source§fn incoming_message(&self) -> bool
fn incoming_message(&self) -> bool
Whether the operation records a message someone received.
#[resource] generates it from #[action(incoming_message)].Source§fn irreversible(&self) -> bool
fn irreversible(&self) -> bool
Whether the operation loses what Undo cannot bring back, beside its
document change.
#[resource] generates it from
#[action(irreversible)].Source§fn leaves(&self) -> bool
fn leaves(&self) -> bool
Whether the operation leaves the system for good.
#[resource]
generates it from #[action(leaves)].Source§fn by_app(&self) -> bool
fn by_app(&self) -> bool
Whether only the app’s own code applies this operation
(
#[action(by_app)]): it is declared to no caller, and an action API that
decodes one refuses it. #[resource] generates it.Source§fn compensates(&self) -> bool
fn compensates(&self) -> bool
Whether this operation declares the verb that undoes it
(
#[action(undo = path)]).Source§const QUEUES: bool = false
const QUEUES: bool = false
Whether every change of the record may queue an outside consequence
(
#[resource(queue = path)]): Self::queue runs after each.Source§fn queue(record: &mut Self::Record, before: &Self::Record, cx: &mut ActionCx)
fn queue(record: &mut Self::Record, before: &Self::Record, cx: &mut ActionCx)
Queue in the record’s outboxes what the change from
before to
record must do outside (#[resource(queue = path)]).Source§fn perform_item(
&self,
doc: &mut AutoCommit,
cx: &mut ActionCx,
) -> Option<Result<(), Refusal>>
fn perform_item( &self, doc: &mut AutoCommit, cx: &mut ActionCx, ) -> Option<Result<(), Refusal>>
Apply an item method (
fn star(contact: &mut Contact)) to its item
alone in doc: read the item, run the method, write what changed.
None for any other operation, or where the record holds an
invariant of its own.Source§fn compensation(
&self,
before: &Self::Record,
after: &Self::Record,
minted: &[Id],
) -> Option<Result<Self, String>>
fn compensation( &self, before: &Self::Record, after: &Self::Record, minted: &[Id], ) -> Option<Result<Self, String>>
The verb that undoes this one, from the record before and after it
ran and the ids it minted (
#[action(undo = path)]). None when it
declares none: undo then reverts the document by inverse patches.Auto Trait Implementations§
impl Forget for TextAssistancePrefsAction
impl Freeze for TextAssistancePrefsActionwhere
*const u8 is !null: Freeze,
PhantomData<Segment>: Freeze,
PhantomData<u8>: Freeze,
PhantomData<Value>: Freeze,
*const LeafNode<String, Value> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(String, Value)>>: Freeze,
PhantomData<fn() -> TextAssistancePrefs>: Freeze,
impl Move for TextAssistancePrefsAction
impl RefUnwindSafe for TextAssistancePrefsAction
impl Send for TextAssistancePrefsAction
impl Sync for TextAssistancePrefsAction
impl Unpin for TextAssistancePrefsAction
impl UnsafeUnpin for TextAssistancePrefsActionwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<Segment>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Value>: UnsafeUnpin,
*const LeafNode<String, Value> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, Value)>>: UnsafeUnpin,
PhantomData<fn() -> TextAssistancePrefs>: UnsafeUnpin,
impl UnwindSafe for TextAssistancePrefsAction
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> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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