Skip to main content

TextAssistancePrefsAction

Enum TextAssistancePrefsAction 

Source
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

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TextAssistancePrefsAction

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for TextAssistancePrefsAction

Source§

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

Source§

const KIND: &'static str = "settings.text-assistance"

The resource kind the record is published as.
Source§

type Record = TextAssistancePrefs

Source§

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

What this operation can do. #[resource] derives it from each verb’s signature.
Source§

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>

Run the operation’s method on the record.
Source§

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

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

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

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

Whether the operation records a message someone received. #[resource] generates it from #[action(incoming_message)].
Source§

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

Whether the operation leaves the system for good. #[resource] generates it from #[action(leaves)].
Source§

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

Whether this operation declares the verb that undoes it (#[action(undo = path)]).
Source§

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)

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>>

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>>

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.
Source§

impl Serialize for TextAssistancePrefsAction

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more